Kacper
Kacper

Reputation: 41

ModuleNotFoundError: No module named pandas

I'm in battle with one error sine yesterday. I checked similar topics on stackoverflow, but nothing worked.

That's my project structure:

enter image description here

When I type:

uvicorn main:app --reload

To start fastapi this error occure:

File ".\main.py", line 2, in from scraper.scraper import Scraper File ".\scraper\scraper.py", line 3, in import pandas as pd ModuleNotFoundError: No module named 'pandas'

I have tried to add new PATH in windows, change structure of my project. Do you know hot to handle it?

Upvotes: 0

Views: 926

Answers (1)

itay
itay

Reputation: 100

Not pycharm problem,

when running in pycharm terminal your python runs in venv - which has seperate pip packages (thats the point of venv), but uvicorn probably passes the data to local python installation and not the venv.

so now after installing pandas in regular cmd, its installed system wide, and you can try running your command in pycharm too

Upvotes: 1

Related Questions