Jupyter Notebook报错 ModuleNotFoundError: No module named ‘pandas’

ModuleNotFoundError: No module named ‘pandas’

pip install pandas

conda install pandas(玄学警告)

新建python3导入pandas报题目的错,去Anaconda Prompt查看pandas,我用的是conda去查看,显示有pandas,怀疑是版本的问题,准备更新一下版本,结果重启Jupyter以后还是报错;再回到Anaconda Prompt用pip来直接安装pandas,重启Jupyter以后能导入pandas了,但是报了警告(我这暴脾气),看警告直接解决

py:138: UserWarning: Pandas requires version '2.7.0' or newer of 'numexpr' (version '2.6.9' currently installed).
  warnings.warn(msg, UserWarning)

“numexpr”的版本需要更新,至少为2.7.0

pip install --user numexpr==2.7.0

Jupyter Notebook报错 ModuleNotFoundError: No module named ‘pandas’_第1张图片

 解决问题

 

这是想忽略已有版本直接更新(和上面的警告已经没有关系了),遇见以下报错:

pip install pandas --upgrade --ignore-installed pandas

ERROR: astroid 2.2.5 requires typed-ast>=1.3.0; implementation_name == "cpython", which is not installed.

连着下面还有一段报错,并且给了解决方案

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 
......
Consider using the `--user` option or check the permissions.

可知加上--user即可:

pip install --user typed-ast==1.3.0

你可能感兴趣的:(jupyter,python,ide)