python: after installing anaconda, how to import pandas

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

    For OSX:

    I had installed this via Anaconda, and had a hell of a time getting it to work. What helped was adding the Anaconda bin AND pkgs folder to my PATH.

    Since I use fishshell, I did it in my ~/.config/fish/config.fish file like this:

    set -g -x PATH $PATH /Users/cbrevik/anaconda/bin /Users/cbrevik/anaconda/pkgs
    

    If you use fishshell like me, this answer will probably save you some trouble later using pandas as well.

提交回复
热议问题