Python Pandas-缺少必需的依赖项['numpy']1

2024-05-15 20:18:00 发布

您现在位置:Python中文网/ 问答频道 /正文

从昨天开始,我尝试在水蟒上导入软件包时出现了以下错误:

ImportError: Missing required dependencies ['numpy']

我试过卸载Anaconda和Python,切换到Python 2.7,但没有成功,仍然是相同的错误,下面是我得到的代码:

enter image description here

感谢您的帮助!


Tags: 代码numpy错误requireddependenciesanacondamissingimporterror
3条回答

如果你尝试导入numpy会发生什么?

你试过吗

pip install --upgrade numpy
pip install --upgrade pandas

在将pandas升级到0.19.2之后,我就遇到了同样的问题。我用windows命令行中的以下安装/卸载顺序修复了它:

pip uninstall pandas -y
pip uninstall numpy -y
pip install pandas
pip install numpy

这也破坏了matplotlib的安装,所以我也卸载/安装了它。

对于一个看似例行的升级来说是非常奇怪的行为。

我不得不安装另一个程序包:

sudo apt-get install libatlas-base-dev

似乎它是numpy的依赖项,但是pipapt-get不会出于任何原因自动安装它。

相关问题 更多 >