Garrett
Garrett

Reputation: 3

Import pandas error

I keep getting an error in Git Bash as I run my python code:

$ python Humiditypyth.py
Traceback (most recent call last):
  File "Humiditypyth.py", line 1, in <module>
     import pandas as pd
ImportError: No module named pandas

I have Anaconda installed and I checked in "python list" that pandas is installed. Can you please help?

Upvotes: 0

Views: 2520

Answers (2)

Athena
Athena

Reputation: 185

Try

  • python3.6 Humiditypyth.py. [try using sudo if it doesn’t help]
  • pip3 freeze - check if you can see pandas in there. If not do pip3 install pandas

Upvotes: 3

Miguel
Miguel

Reputation: 1345

Let's do a checklist

  1. Do you have anaconda installed in the same python version that you are using? e.g. if python is calling python2.7 and python3 does python 3.6 you have to install anaconda in the right folder with either "sudo pip install anaconda" or "sudo pip3 install anaconda"

  2. after that I think you still have to install pandas "pip install pandas" or "pip3 install pandas"

I might be wrong though I never used that library.

Upvotes: 0

Related Questions