Issue #33 resolved

need better documentation for VIRTUALENVWRAPPER_PYTHON

Doug Hellmann avatarDoug Hellmann created an issue

The Python interpreter found in the $PATH when virtualenvwrapper.sh is sourced will be used by virtualenvwrapper commands regardless of changes to $PATH later. This prevents virtualenvwrapper from using a python interpreter inside a virtualenv (unless that's the one in the $PATH, of course).

Comments (4)

  1. Doug Hellmann

    Full details from Markus:

    I have had a little problem after updating to virtualenvwrapper 2.0.2 and found your message on Twitter about the issue. After updating to the new virtualenvwrapper I got the error "/usr/bin/python: No module named virtualenvwrapper". I am using MacOS.

    Maybe the solution I found for me can help:

    The error is produced when you 'source' virtualenvwrapper.sh. By the way: I first had to find out that there is no virtualenvwrapper_bashrc anymore. But that's just because I didn't read your blog post about the new release.

    I am using distribute/pip for installing and updating Python packages. It made no difference for me if I used '--upgrade' with pip or did a complete new install of virtualenvwrapper with 'pip install'.

    I found the problem to be with my environment. I use the Python distribution for MacOS provided by python.org instead of the one bundled with MacOS (in /usr/bin/). This means I set my PATH variable to include /Library/Frameworks/Python.framework/Versions/2.6/bin prepending /usr/bin/. Since virtualenvwrapper.sh checks for a Python interpreter by doing '$(which python)' it is important to source virtualenvwrapper.sh _AFTER_ the PATH is set. Or setting VIRTUALENVWRAPPER_PYTHON, I guess. After making sure I source virtualenvwrapper.sh after the PATH is set correctly in my bash configuration it works. This was not a problem with virtualenvwrapper_bashrc.

    Best regards, -Markus-

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.