系统中的Python升级会在virtualenv中产生问题 - 找不到与平台无关的库

时间:2016-08-03 19:00:31

标签: python ubuntu

我从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再次重建环境并重新安装该环境的包,但我也有其他环境。

  • 我该怎么做才能解决这个问题?

非常感谢。

0 个答案:

没有答案