通过 pip install virtualenv 安装时出现 UnicodeDecodeError

UnicodeDecodeError when installing via pip install virtualenv

虚拟环境 15.0.1

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 已停用):

root@simple_project:~# pip install django-crequest==2016.3.16

但是当我激活 virtualenv 时:

(photoarchive) root@simple_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/

你能帮我了解这是怎么回事以及如何处理吗?

该软件包的 LICENSE 文件中似乎有非 ascii 文本,有些东西(pip?)不喜欢它。尝试设置 LC_CTYPE="C.UTF-8".