Issues

Issue #131 resolved

Manipulation of PYTHONHOME destroys ability to deactivate

rocketman
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 reporter

    (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 repo owner

    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