安裝pandas之后在python shell中不能正常引入
報錯如下
The current Numpy installiation() fails to pass a sanity check due to a bug in the Windows runtime.
經排查并不是pandas的問題,而是pandas的依賴包numpy的版本問題;
本人電腦是Win10 20H2 最新版本,numpy最新版1.19.4運行有問題,所以導致pandas和numpy都不能import,
解決方法
卸載掉默認安裝的最新版numpy,指定安裝1.19.3版本
實作步驟:
- 查看安裝的所有包
pip list - 卸載numpy
pip uninstall numpy - 安裝numpy 1.19.3
pip install numpy==1.19.3
再次進入python命令列,import pandas就不會報錯啦
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/203199.html
標籤:其他
