在安裝pandas程序中,明明已經安裝好了,但就是不能運行。

代碼如下:
import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\shalp\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\__init__.py", line 17, in <module>
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
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.7 from "C:\Users\shalp\AppData\Local\Programs\Python\Python37\python.exe"
* The NumPy version is: "1.19.2"
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'
1.先是想辦法升級pip,按照CMD上的辦法更新了,故障依然存在。
2.在CADN上搜索了很多網頁,有一個網頁提示下載新的numpy。按照提示下載了nympy的版本,還是沒有用。

3.想到是不是pip更新的問題,在其實電腦上下載了原來版本的pip,覆寫。
4.發現在lib檔案夾里的numpy又變成了原來的了,再一次覆寫掉,最后OK
總結一下:我們現在遇到的問題,基本上以前都有人遇到過了,所以先在網路上找答案,是比較方便的。
uj5u.com熱心網友回復:
下載安裝anaconda, 擅長資料和計算, 包含了一千多個常用包, 不用你手動安裝包.轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/243399.html
上一篇:python爬取東方財經的資料
