Issue #131 resolved

Manipulation of PYTHONHOME destroys ability to deactivate

rocketman avatarrocketman created an issue

I need to manipulate PYTHONHOME from postactivate script. (Reason: wxpython needs a framework install of python to provide access to the MAC OSX GUI - see: http://wiki.wxpython.org/wxPythonVirtualenvOnMac for more details).

I then restore PYTHONHOME from predeactivate script. When I deactivate - the script cannot run because even though it is using the python interpreter at VIRTUALENVWRAPPER_PYTHON the setting of the PYTHONHOME does not allow it to find the base virtualenvwrapper module.

Should the various "python -c" calls also include "-E" so PYTHONHOME is ignored? (although I believe PYTHONPATH is ignored too which may not be the solution)

Is there another way to easily keep a virtualenv but utilize a framework install binary such that MAC OSX GUI will be able to be accessed by wxpython?

Comments (3)

  1. rocketman

    (Reply via to...@vanpelts.net):

    I assume that you are referring to using "--system-site-packages" when I = create the virtualenv?

    That would work - but there is also a bunch of other packages installed = in global that I did not want to expose.

    This really may not be "a bug" per se - my solution is that I just = installed virtualenvwrapper in that environment too so it has access to = it for activate and deactivate sequences.

    BTW - Great package. I am pushing it quite hard as I am trying to = integrate easily using wingide and wxpython (among a few other things) = all in the same environment on a MAC OSX. It has taken a few iterations = to get it the way I want it. virtualenvwrapper has been super helpful! = Thanks.

  2. Doug Hellmann

    I'm reluctant to ignore all of the python environment variables because that would break the ability to do things like install virtualenvwrapper into a virtualenv (which is how the tests work, and may be useful in "production" environments, too).

    It sounds like you have found a work around, so I am going to close the ticket. If you discover another solution that involves code changes, let me know and we can reopen and discuss.

  3. 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.