Search code examples
pythonpython-2.7virtualenvvirtualenvwrapper

Virtualenvwrapper environments not visible in finder or terminal


Using OSX 10.9.2

Just getting to grips with virtualenv and virtualenvwrapper. I am having an issue where the environments I create with virtualenv are visible in both terminal and finder, but environments that I create with virtualenvwrapper are not.

Here are the steps I take in terminal.

virtualenv virt_env/virt1 --no-site-packages

Successfully creates a virtualenv called virt1

source virt1/bin/activate

Activates the virtualenv

(virt1)localhost:virt_env brendan$ 

I have several of these virtual environments set up and working and I am able to install packages in each, as I would expect. I am able to switch between them and remove them as necessary. I am also able to see them in Finder and in Terminal.

However when I create virtual environments using virtualenvwrapper it appears that I am able to work with them but I am not able to see them.

Here are the steps I take with virtualenvwrapper

localhost:~ brendan$ mkvirtualenv virt_env/virt4
New python executable in virt_env/virt4/bin/python
Installing setuptools, pip...done.
(virt4)localhost:~ brendan$ 

I am able to work with this e.g.

(virt4)localhost:~ brendan$ sudo easy_install yolk

And I am able to deactivate and reactivate it. e.g.

deactivate
localhost:~ brendan$ 
workon virt_env/virt4
(virt4)localhost:~ brendan$ 

But when I go to finder I am only able to see the environments (virt1, virt2, virt3) that I created via virtualenv and not the environments (virt4) that I created using virtualenvwrapper

I am using these tutorials

Virtualenv Virtualenvwrapper


Solution

  • Make sure that you've defined your WORKON_HOME environment variable to tell virtualenvwrapper where to put your environments (see the documentation)