ImportError: No module named 'pandas' (inside virtualenv)

后端 未结 4 1586
野的像风
野的像风 2020-12-22 03:17

I created a virtual environment named quora for python. I installed wheel and then pandas as instructed. I cant get pandas to work for some reason. Can someone help me. I

相关标签:
4条回答
  • 2020-12-22 03:56

    Don't use sudo in a virtualenv — sudo pip install installs packages into global site-packages, not in virtualenv.

    Either install pandas in the virtual environment (pip install after activating venv) or enable access to the global packages (recreate venv with option --system-site-packages or use command toggleglobalsitepackages from virtualenvwrapper).

    0 讨论(0)
  • 2020-12-22 04:03

    Check "which python" you are running using that command. You may need to export PATH to the python env instead of your default python which might be /usr/lib/bin. It might be installed in your quora env but the python that is being picked up is different and that doesn't have pandas

    0 讨论(0)
  • 2020-12-22 04:06

    I had this problem in a virtualenv with pip3 and pandas, tried all these previous answers, none of which actually work. but you can use easy_install pandas. et voilà.

    0 讨论(0)
  • 2020-12-22 04:10

    I had the same problem. I fixed it by deleting my virtualenv directory and creating a new environment.

    0 讨论(0)
提交回复
热议问题