【发布时间】:2016-08-16 06:22:12
【问题描述】:
我的 virtualenv 中有 python 3.4,但是在将 ubuntu 升级到 16.04 后,python 升级到了 3.5,所以 virtualenv 中的 python 崩溃并出现以下错误:
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'
Current thread 0x00007f2f2dbcb700 (most recent call first):
fish: “python” terminated by signal SIGABRT (Abort)
我该如何解决?
【问题讨论】:
-
您是否尝试过重新安装 Python 3.5?
encodings模块是基础安装的一部分。
标签: python ubuntu virtualenv