简体   繁体   中英

When I try to install pandas I receive the error 'no module named pandas', but I do have it installed

I want to install pandas in atom, however when I run import pandas as pd

I get ImportError: No module named pandas

I'm confused why because I definitely have pandas downloaded (checked through pip --freeze )

when I type python --version I get

Python 2.7.16:: Anaconda, Inc.

Other answers to similar questions have suggested the problem is that pandas is installed on a different version of python. However, when I run

python2 -m pip install pandas

I get

Requirement already satisfied: pandas in ./opt/anaconda2/lib/python2.7/site-packages (0.24.2)

if pandas is downloaded to python 2.7 and im running python 2.7, I don't understand why it says it can't be found when trying to install it.

It seems you have two different installations of python in your system, one installed via anaconda and another, probably system default.

Try conda install pandas instead, since your system is defaulting to the anaconda installation.

Or you could try going back to the default system installation which has already been covered in StackOverflow .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM