我从Ubuntu 14.04
升级到Ubuntu 16.04
,python3
从3.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)
On选项是使用新的python再次重建环境并重新安装该环境的包,但我也有其他环境。
非常感谢。