I'm in battle with one error sine yesterday. I checked similar topics on stackoverflow, but nothing worked.
That's my project structure:
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?
CodePudding user response:
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