0

I am new to Python and I am trying to import pandas but I'm getting

"ModuleNotFoundError: No module named 'pandas'"

How can I fix this? I tried on both Python 3.8 and 3.7 and they're giving me the same error. I have Anaconda installed and I'm pretty sure pandas come with it? I have also tried pip install pandas and it gives me

"Requirement already satisfied"

Please help me!!

Update: I just got mad and deleted Anaconda. I found another way to use pandas which is by doing pip install pandas in cmd.

Cedric Zoppolo
  • 4,271
  • 6
  • 29
  • 59
cccccc
  • 25
  • 5
  • 2
    Does this answer your question? [ImportError: No module named pandas](https://stackoverflow.com/questions/33481974/importerror-no-module-named-pandas) – Bruno Mello Apr 09 '20 at 23:02

2 Answers2

0

If you have multiple instances of Python you likely have Pandas associated with another installation of Python. Please see the docs here for installation and set-up. You can use sys.executable to see which instance of Python you are currently running.

Following the answer provided in this question you can try which python to see which one you are using as well. This answer includes a solution of how to update your path to the correct version.

adlopez15
  • 3,449
  • 2
  • 14
  • 19
0

use python -m pip install pandas this will install the pandas with the python environment you are running your code.

one done, you can do run your program using python <program>.py

it is better if you maintain different python version in separate virtual environments

sahasrara62
  • 10,069
  • 3
  • 29
  • 44