Python script is keep running on global environment in linux even the virtual environement is active #20849
Unanswered
niranjan-pattanaik
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Did you select the virtual environment in VS Code itself? And when you run |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have installed fastapi with in my new virtual environment which i can confirm with
pip list
but when i try to import fastapi withfrom fastapi import FastAPI
it shows module not found error. Where as i have checked my python interpreter path withwhich python
which again redirects to the same correct virtual environment path and again to confirm with pip list it also shows module name but somehow while running it keeps running on the global environment.Installed packages in my virtual environment :
`
Package Version
anyio 3.6.2
click 8.1.3
fastapi 0.94.1
h11 0.14.0
httptools 0.5.0
idna 3.4
pip 22.0.2
pydantic 1.10.6
python-dotenv 1.0.0
PyYAML 6.0
setuptools 59.6.0
sniffio 1.3.0
starlette 0.26.1
typing_extensions 4.5.0
uvicorn 0.21.0
uvloop 0.17.0
watchfiles 0.18.1
websockets 10.4`
Beta Was this translation helpful? Give feedback.
All reactions