I am having trouble running my FastAPI project. I execute the following command: uvicorn main:ia --port 8000 --reload
, and when it starts running, it throws the following error:
from qdrant_client import QdrantClient
ModuleNotFoundError: No module named 'qdrant_client'
I have already tried different options, such as creating a virtual environment and installing the dependencies, and changing the Python version I’ve used 3.11
and 3.13
but the error persists. The funny thing is that I had this code in a plain Python file, and it worked correctly, but I decided to create a backend with FastAPI, and now it fails. I don’t know what else to try. I’ve also run the command pip show qdrant_client
, and it does show information.
3
I realized that even though I had the virtual environment activated, it was looking for packages in the global 3.11
environment. The solution was to run the project as follows:
python -m uvicorn main:ia --port 8000 --reload
I have been using conda
environment, and have not been facing any issue. You can try that though.