I had python 3.4 in my virtualenv, but after upgrading ubuntu to 16.04 python upgraded to 3.5 so python in virtualenv crashes with these errors:
Could not find p
I had the same problem today and that is how I have solved it:
Problem: Firstly, as I understand, the problem occurs because after upgrading to Ubuntu 16.04 the previous version of Python also upgrades. As a result symbolic links inside any Python3 environment are not working anymore.
Solution 1: As it was written above the straightforward solution is to remove all the Python3 environments and create them again. I don't like it because it is second time I do it after upgrading Ubuntu. Also probably I need to use multiple Python 3 versions in the future projects.
Solution 2: That is what I have tried today and it is working fine. Instead of using virtualenv + virtualenvwrapper I decided to try combination of pyenv + pyenv-virtualenv
.
The main difference between two approaches is:
Pyenv actually copies an entire Python installation every time you create a new pyenv version. In contrast, virtualenv makes use of symbolic links to decrease the size of the virtualenv’s.
Howto: