Jupyter python3 notebook cannot recognize pandas

后端 未结 14 1015
终归单人心
终归单人心 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:23

    For Windows

    The first step is to create a new conda environment. A conda environment is like a virtualenv that allows you to specify a specific version of Python and set of libraries. Run the following commands from a terminal window:

    conda create -n name_of_my_env python
    

    This will create a minimal environment with only Python installed in it. To put your self inside this environment run:

    source activate name_of_my_env
    

    On Windows the command is:

    activate name_of_my_env
    

    The final step required is to install pandas. This can be done with the following command:

    conda install pandas
    

    To install a specific pandas version:

    conda install pandas=0.20.3
    

    To install other packages, IPython for example:

    conda install ipython
    

    To install the full Anaconda distribution:

    conda install anaconda
    

    If you need packages that are available to pip but not conda, then install pip, and then use pip to install those packages:

    conda install pip
    pip install django
    

提交回复
热议问题