gpt4 book ai didi

python - pip install django-toolbelt 报错:"codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: ' ascii' codec can't decode byte 0xc2

转载 作者:行者123 更新时间:2023-11-28 22:43:44 26 4
gpt4 key购买 nike

我使用 Arch Linux 和默认的 Python 3。我使用 Konsole 通过命令 pip install django-toolbelt 下载 django-toolbelt。名称: pip 版本:6.1.1

我得到一个错误

Collecting django-toolbelt
Using cached django-toolbelt-0.0.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): django in ./venv/lib/python3.4/site-packages (from django-toolbelt)
Requirement already satisfied (use --upgrade to upgrade): psycopg2 in ./venv/lib/python3.4/site-packages (from django-toolbelt)
Collecting gunicorn (from django-toolbelt)
Using cached gunicorn-19.3.0-py2.py3-none-any.whl
Collecting dj-database-url (from django-toolbelt)
Using cached dj_database_url-0.3.0-py2.py3-none-any.whl
Collecting dj-static (from django-toolbelt)
Using cached dj-static-0.0.6.tar.gz
Collecting static3 (from dj-static->django-toolbelt)
Using cached static3-0.6.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-w5v7urb2/static3/setup.py", line 52, in <module>
long_description=open('README.rst').read(),
File "/home/phi/python/venv/lib/python3.4/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 2097: ordinal not in range(128)

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-w5v7urb2/static3

我该如何解决?

最佳答案

运行

LC_ALL=en_US.utf8 pip install django-toolbelt

pip 有问题。如果您使用像 C 这样的非 unicode 语言环境并尝试使用 pip 安装包 UnicodeDecodeErrors 可能会在 setup.py 尝试读取包含非 ASCII 字符的文件。

在这种情况下,它是重音符号 ´ 在 this change 中引入.

我将在 Github 上报告这个问题。

关于python - pip install django-toolbelt 报错:"codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: ' ascii' codec can't decode byte 0xc2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30286031/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com