how can I find the path of virtualenv python

Question:

how can I find the path of virtualenv python ,built with this tutorial?
(i want to find python in this env and use it in my eclipse)

$ sudo pip install virtualenv virtualenvwrapper
$ export WORKON_HOME=$HOME/.virtualenvs
$ source /usr/local/bin/virtualenvwrapper.sh

$ echo -e "n# virtualenv and virtualenvwrapper" >> ~/.bashrc
$ echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.bashrc
$ echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc

$ source ~/.bashrc

$ mkvirtualenv cv -p python3
Asked By: hossein hayati

||

Answers:

mkvirtualenv creates virtualenvs in $WORKON_HOME, that is your virtualenv is in $HOME/.virtualenvs/cv/.

Answered By: phd

You can use which to find out which binary will be executed…

For example:

$ which python3
/home/attie/projects/thing/venv/bin/python3

By default it just shows the first match, but you can give the -a argument to show all:

$ which -a python3
/home/attie/projects/thing/venv/bin/python3
/usr/bin/python3
Answered By: Attie

There is VIRTUAL_ENV system variable already set with the path.

Check <your_venv>/bin/activate (which is a simple script) to see how the virtual env is setup in general, but this variable will give you the clean path already:

echo $VIRTUAL_ENV
<full virtual env path>
Answered By: Emilio