Abraham Esquivel
Abraham Esquivel

Reputation: 81

Can't import pandas in Pycharm

I'm running python3.6 in a conda enviroment, pandas is installed. I run my code in terminal and it works, but when I run it in pycharm it shows:

>  import pandas as pd ModuleNotFoundError: No module named 'pandas'

I checked my interpreter, checked the packages installed, AND PANDAS IS THERE!, but I don't know why it is not recognizing it.

Packages installed

Upvotes: 0

Views: 2287

Answers (1)

Mogi
Mogi

Reputation: 614

Pycharm has many configuration, which can be a bit confusing at first.

First of all there are the interpreters configured in your environment, like the one you set up in your question.

Secondly there are specific configurations for running your application, you can create many run configurations for you project in order to run different files/modules with different interpreters (for example run the project with python3 project specific venv, and your tests using pytest interpreter) as explained here

I think you didn't set the run/debug configurations to use this specific interpreter, or accidentally created a project venv that doesn't contains pandas yet.

By the way, it is very recommended to create project specific venv as explained here

Upvotes: 1

Related Questions