系统中的Python升级在virtualenv中创build问题 – 找不到与平台无关的库

我从Ubuntu 14.04升级到Ubuntu 16.04python33.4.3更改为3.5.2 。 (我使用的是64 bit Ubuntu)我有一个使用python3的虚拟环境。 现在,当我去那个环境,尝试运行我的Flask应用程序,甚至使用PIP,它会给出错误

 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) 
  • 我怀疑是因为python升级而发生的。 我对吗?

On选项是用新的python重新编译环境,并重新安装那个环境的包,但是我也有其他的环境。

  • 我能做些什么来解决这个问题?

非常感谢。