Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is python interpreter located in virtualenv?

Tags:

python

linux

I'm working on a GUI project and need to point it to the python interpreter inside my virtualenv but can't find where it lives.

like image 244
chisels Avatar asked Jul 11 '26 03:07

chisels


2 Answers

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

import sys
print(sys.executable)
like image 106
Arty Avatar answered Jul 13 '26 07:07

Arty


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.

like image 26
Bharath Avatar answered Jul 13 '26 06:07

Bharath