0

我在 ubuntu 10.04 中安装了 python 2.7:

./configure
make
sudo make altinstall

Python 工作正常:

~$ python2.7
Python 2.7 (r27:82500, Mar  6 2013, 15:39:19)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

但:

~$ virtualenv -p python2.7 ~/virtualenv/python27
Running virtualenv with interpreter /usr/local/bin/python2.7
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 1378, in <module>
    """.decode("base64").decode("zlib")
LookupError: unknown encoding: zlib.

怎么回事?

4

1 回答 1

1

您正在使用 2.6 python 的 virtualenv:检查您的行:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/virtualenv.py"

你在python2.7中安装了virtualenv吗?如果两者都有,通常被命名为 virtualenv2.7。

于 2013-03-06T15:24:50.937 回答