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

标签 python pandas numpy

enter image description here

我目前正在关注机器学习的初学者介绍。 在输入命令时: import pandas as pd 在终端的 python shell 中,我收到一条错误消息:

ImportError: Missing required dependencies ['numpy'].

我已经看了另一个类似的问题,尝试了那个解决方案,但仍然收到同样的错误。

最佳答案

看起来您可能在 Mac 上运行并且可能使用默认系统 python。无论出于何种原因,您都没有完成安装。你有 pandas 但没有 numpy。我不确定您正在学习的教程使用了哪些包,但我建议安装 Anaconda python distribution因为它包括 pandas、它的所有依赖项等等,包括经常用于机器学习的 scikit-learn 包。

如果您想了解更多关于在 Mac 上安装用于机器学习的 Python 环境,有一个很好的 tutorial在 machinelearningmastery.com 上。

关于python - Pandas 缺少必需的依赖项 ['numpy'],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44220798/

相关文章:

python - 是什么导致 Python 段错误?

python - 如何散列 numpy 数组以检查重复项

python - 如何处理分类变量列中的 0 值?

python - 为什么我不断收到此错误 'RuntimeWarning: overflow encountered in int_scalars'

python - 启动器中的 fatal error : Unable to create process using '"' in python

python - json对象作为获取参数

python - scipy.optimize.lsq_linear 边界错误

python - 在 numpy 中禁用静默转换

python - 如何在 Python 中替换数据框中的子字符串

python - 如何将数据分离到 pandas 中的不同变量中