Jupyter python3 notebook cannot recognize pandas

后端 未结 14 1020
终归单人心
终归单人心 2020-12-14 15:56

I am using the Jupyter notebook with Python 3 selected. On the first line of a cell I am entering:

import pandas as pd

The error I get from

14条回答
  •  感情败类
    2020-12-14 16:17

    This is what i have done in my system:

    I have installed both anaconda for python 2.7 and anaconda for python 3.5. Anaconda helps keep both the environment separate.

    In Ubuntu:

    The directory structure is like this: anaconda2/bin/ anaconda3/bin/

    Whenever i want to use python 2.7 i go to anaconda2/bin/ and create an environment or activate already existing environment and install or import all the necessary packages and same goes for python3.5 (go to anconda3/bin/ create or activate the required environment). This helps me keep things separate.

    Since you are using anaconda you should first use "conda install " if that package is not found, then you can use pip install .

    In Windows:

    If you install both anaconda2 and anaconda3, its quite easy.. the shortcuts for anaconda prompt are in C:\Users\your-username\

    there will be two folders anconda2 and anaconda3, you can start conda prompt for python2.7 from anaconda2 and python3.5 from anconda3

    So, once you start the anaconda prompt you can just type "jupyter notebook" to open jupyter notebook in browser and import pandas(or any package).

    You can check this link:

    http://conda.pydata.org/docs/test-drive.html#managing-conda

提交回复
热议问题