Reputation: 3431
I re-installed Python 2.7 with the official DMG installer from python.org because I needed to use a pre-compiled binary which choked on my 64-bit Python install..
(Recompiling it to run in 64-bit is too difficult for me, not an option)
It worked, the Python mac Installer fixes all the links, so my new python install is 32-bit, but all the virtualenv I had created with the 64-bit Python cannot use Python anymore, here is the output :
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/dom/django/.virtualenvs/lepoc/bin/python
Reason: no suitable image found. Did find:
/Users/dom/django/.virtualenvs/lepoc/bin/../.Python: no matching architecture in universal wrapper
/Users/dom/django/.virtualenvs/lepoc/bin/../.Python: no matching architecture in universal wrapper
Trace/BPT trap
Is there a possible fix (like re-linking something) or do I have to re-create all my virtualenv ?
Upvotes: 2
Views: 1452
Reputation: 2193
I'd go with recreating them. The "python" executable in the bin folder is an executable and is probably specific to your architecture and/or python binary. You can save all installed python packages and reinstall them in the new virtual environment using pip:
pip freeze -E lepoc > requirements.txt
pip install -E newve -r /path/to/pip-requirements.txt
See also http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/
Upvotes: 3