I've been using Python 2.7.10 in a virtualenv
environment for a couple of months.
Yesterday, activating the environment went fine, but today suddently I get this cryptic error when trying to start Python from Terminal:
Illegal instruction: 4
I have made no changes to my environment (AFAIK), so I'm having a difficult time trying to come to terms with what this error is and what caused it.
Python works fine outside of this virtualenv
environment. When running via /usr/local/bin
it presents no problem.
I've had this problem a number of times now. While I can't say for certain what the actual issue is, I believe it basically means that some file(s) in the virtualenv
installment of Python have become corrupted.
I keep my virtual environment in a synced Dropbox folder, so that may be a large contributor to the issue.
Restoring the virtual environment from a back-up archive worked for me. Or simply reinstall an identical virtual environment.
cd <path/to/old_env>
and source /bin/activate
.cd
to an accessible location on the drive and run pip freeze > requirements.txt
to export a list of currently installed Python modules.virtualenv <path/new_env>
virtualenv -p <path>
. Assuming that you have downloaded the Python version with Homebrew, e.g.: virtualenv -p /usr/local/bin/python2.6 <path/new_env>
cd <path/new_env>
and then do source /bin/activate
.pip freeze > requirements.txt
, cd
to the folder where the text file is located and do pip install -r requirements.txt
.pip
manually.I had same problem and found solution by uninstalling psycopg2 and installing older version. As I understood my comp was not supporting some commands in new version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With