python: after installing anaconda, how to import pandas

前端 未结 13 2174
眼角桃花
眼角桃花 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:46

    even after installing anaconda i got the same error and entering python3 showed this:

    $ python3
    Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    

    enter this command: source ~/.bashrc (it is kind of restarting the terminal) after running the command enter python3 again:

    $ python3
    Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
    [GCC 7.3.0] :: Anaconda, Inc. on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    this means anaconda is added. now import pandas will work.

提交回复
热议问题