gpt4 book ai didi

python-3.x - pip install tabulate UnicodeDecodeError 错误

转载 作者:行者123 更新时间:2023-12-02 12:39:54 25 4
gpt4 key购买 nike

我尝试通过在 Archlinux 上运行 pip3 install tabulate 来安装 python 包 tabulate,但出现以下错误:

Downloading/unpacking tabulate
Downloading tabulate-0.6.tar.gz
Running setup.py egg_info for package tabulate
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip_build_user/tabulate/setup.py", line 8, in <module>
LONG_DESCRIPTION = open("README.rst").read().replace("`_", "`")
File "/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 8035: ordinal
not in range(128)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 16, in <module>

File "/tmp/pip_build_user/tabulate/setup.py", line 8, in <module>

LONG_DESCRIPTION = open("README.rst").read().replace("`_", "`")


File "/usr/lib/python3.3/encodings/ascii.py", line 26, in decode

return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 8035: ordinal not in range(128)

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_user/tabulate
`Storing complete log in /home/user/.pip/pip.log

我正在运行:

  • python -V -> Python 3.3.2
  • pip3 -V -> 来自/usr/lib/python3.3/site-packages (python 3.3) 的 pip 1.4.1

我已经通过pip成功安装了其他软件包,但我不知道为什么突然发生这种情况。谁能告诉我如何解决这个问题?

解决方案看起来是我的操作系统上的区域设置问题。必须将全局 LANG 环境变量覆盖为 LANG="en_US.UTF-8"。

最佳答案

解决方案 这看起来像是我的操作系统上的区域设置问题。必须将全局 LANG 环境变量覆盖为 LANG="en_US.UTF-8"。

关于python-3.x - pip install tabulate UnicodeDecodeError 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19967443/

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