I have been using a python virtual environment (virtualenv) successfully for a while. I just upgraded to the new version of Ubuntu, and it has messed up my environment. I was under the impression that a virtualenv was self-contained, but apparently I was wrong. :)
Here's the error:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted (core dumped)
I was thinking that maybe it had to do with the fact the Ubuntu changed from Python 3.4 to 3.5, so I tried to change the version my environment used with
virtualenv --python=/usr/bin/python3.5 py3default
but it wouldn't update Python for me.
Note: this looks to be a duplicate, but doesn't have a solution yet.