Where is python interpreter located in virtualenv?

Viewed 5790

Where is python intrepreter located in virtual environment ?

I am making a GUI project and I stuck while finding the python interpreter in my virtual environment.

where is python interpreter located in virtual env ?

2 Answers

Execute next code and it will print location of your python interpreter.

import sys
print(sys.executable)

To a lot of extents, it depends on how the virtual environment was created. If you installed like this py -m venv env then you would find it here .\env\Scripts\activate . How ever if you created the environment using conda then you would find it here Anaconda_installation_folder/envs/name_of_environment. SO brief answer to your question, you would find it withing you env folder.

Related