Ubuntu 14.04 update broke all my virtual

I saw a couple of fixes for this, but no one worked for me, but I understand that his my virtual names were broken. I just upgraded to 14.04 from 12.04, and now all my pyramid applications no longer work.

When I run ../bin/pserve development.ini , I get the following error:
ImportError: No module named _ctypes

When I run ../bin/python setup.py develop (also when I try to run pshell), I get:
ImportError: No module named _io

I installed one project (each application for the pyramid is in a separate virtual space), first deleting the old project folder, then reinstalling the virtualenv instance and then returning my scripts to me. But it is time consuming and I have several projects.

Is there a quick fix for this?
I have seen python duplicate removal and a simple reinstall of virtualenv , but duplicate removal is not a good option, and the second solution did not work for me. But maybe I did something wrong there.

I really think there must be a quick fix for this. Of course, reinstalling all virtualenvs may not be the only solution?

+8
virtualenv
source share
2 answers

You can just do

 cp /usr/bin/python2 /path/to/my-virtualenv/bin/python2 

or

 cp /usr/bin/python3 /path/to/my-virtualenv/bin/python3 

(No need to create a new virtualenv.)

+4
source share

A quick fix that works is to create a new virtualenv and copy its bin / python to the broken virtualenvs. Five easy steps:

  • mkvirtualenv lero
  • cd ~/.virtualenvs
  • for d in */; do cp lero/bin/python $d/bin/python; done
  • deactivate
  • rmvirtualenv lero
+1
source share

All Articles