python: after installing anaconda, how to import pandas

前端 未结 13 2304
眼角桃花
眼角桃花 2021-01-31 18:00

I have installed anaconda. Now when i am trying to run

import pandas as pd

I am getting the following error

Traceback (most re         


        
13条回答
  •  野性不改
    2021-01-31 18:42

    You can only import a library which has been installed in your environment.

    If you have created a new environment, e.g. to run an older version of Python, maybe you lack 'pandas' package, which is in the 'base' environment of Anaconda by default.

    Fix through GUI

    To add it to your environment, from the GUI, select your environment, select "All" in the dropdown list, type pandas in the text field, select the pandas package and Apply.

    Afterwards, select 'Installed' to verify that the package has been correctly installed.

提交回复
热议问题