2017-07-14 127 views
0

的virtualenv 15.0.1UnicodeDecodeError错误安装的virtualenv

的Ubuntu 16.04.1 LTS

区域设置:

LANG=en_US.UTF-8 
LANGUAGE=en_US.UTF-8 
LC_CTYPE="C" 
LC_NUMERIC="C" 
LC_TIME="C" 
LC_COLLATE="C" 
LC_MONETARY="C" 
LC_MESSAGES="C" 
LC_PAPER="C" 
LC_NAME="C" 
LC_ADDRESS="C" 
LC_TELEPHONE="C" 
LC_MEASUREMENT="C" 
LC_IDENTIFICATION="C" 
LC_ALL=C 

这完全执行(的virtualenv被去激活) :

[email protected]_project:~# pip install django-crequest==2016.3.16 

但是,当我启动的virtualenv:

(photoarchive) [email protected]_project:~/venv# pip install django-crequest==2016.3.16 
Collecting django-crequest==2016.3.16 
    Using cached django-crequest-2016.3.16.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "/tmp/pip-build-g5etn1cn/django-crequest/setup.py", line 9, in <module> 
     license=open('LICENSE').read(), 
     File "/root/venv/photoarchive/lib/python3.6/encodings/ascii.py", line 26, in decode 
     return codecs.ascii_decode(input, self.errors)[0] 
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 204: ordinal not in range(128) 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-g5etn1cn/django-crequest/ 

你能帮我明白是怎么回事,如何应对呢?

回答

0

该软件包似乎在其LICENSE文件中包含非ascii文本,而某些内容(pip?)不喜欢它。尝试设置LC_CTYPE="C.UTF-8"