iT邦幫忙

0

Python下載pandas時遇到的問題

  • 分享至 

  • xImage

因為已經卡在這邊好幾天了,希望可以請大神們幫幫忙:
在import pandas時,出現這樣的錯誤

Traceback (most recent call last):
  File "d:\python\SelfLearnPython_2022\pandas-practice.py", line 6, in <module>
    import pandas as pd
  File "D:\python\SelfLearnPython_2022\site-packages\pandas\__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "C:\Users\User\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
  * The NumPy version is: "1.23.3"
 
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
 
Original error was: No module named 'numpy.core._multiarray_umath'

因此去了pandas的__init__.py檢查錯誤內容

Traceback (most recent call last):
  File "d:\python\SelfLearnPython_2022\site-packages\pandas\__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "C:\Users\User\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
  * The NumPy version is: "1.23.3"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

裡面是這樣寫,有將numpy和其他要求的模組都更新到最近版本了,但還是無法解決
拜託好心人協助看看這應該怎麼解決
謝謝!!!

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

0
tryit
iT邦研究生 4 級 ‧ 2022-10-09 01:39:29
最佳解答

這個喔,
先pip uninstall numpy
再pip install numpy
試試看

0
eric2494
iT邦新手 3 級 ‧ 2022-10-09 16:40:01

補充說明:若你已經裝最新版 python,你應已python3, python3-config, pip3等指令

我要發表回答

立即登入回答