Jupyter Notebook: no module named pandas

点点圈 提交于 2019-12-07 15:39:34

问题


I've searched through other questions but have not found anything that has helped (most just suggest you do install pandas with conda or pip). In my jupyter notebook I'm trying to import pandas (import pandas as pd) but I'm getting the following error:

ModuleNotFoundError: No module named 'pandas'

Some pertinent information:

  • I'm using python3
  • I've installed pandas using conda install pandas
  • My conda environment has pandas installed correctly. After activating the environment, I type python into the terminal and from there I can successfully import pandas and use it appropriately. This leads me to believe that it is an issue with my jupyter notebook.

回答1:


You can try: which conda and which python to see the exact location where conda and python was installed and which was launched.

And try using the absolute path of conda to launch jupyter.

For example, /opt/conda/bin/jupyter notebook




回答2:


Try this for python3

sudo pip3 install pandas



来源:https://stackoverflow.com/questions/47043407/jupyter-notebook-no-module-named-pandas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!