gpt4 book ai didi

python - pip 安装 UnicodeDecodeError

转载 作者:太空狗 更新时间:2023-10-29 20:33:02 28 4
gpt4 key购买 nike

当我尝试使用 pip 在我的新笔记本 (Win 7 64) 上安装 beautifulsoup4 时,出现此错误:

Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run

requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "C:\Python27\lib\site-packages\pip\req.py", line 1234, in prepare_files
req_to_install.assert_source_matches_version()
File "C:\Python27\lib\site-packages\pip\req.py", line 464, in assert_source_ma
tches_version
% (display_path(self.source_dir), version, self))
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 58: ordinal
not in range(128)

Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pip.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\pip\__init__.py", line 185, in main
return command.main(cmd_args)
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 73: ordinal
not in range(128)

我使用:pip install beautifulsoup4 命令

您知道问题出在哪里吗?

PS:笔记本拿到手之前是用来演示的,所以安装了多国语言的程序。

最佳答案

或者简单地说,您可以在安装 pip 之前在您的系统上运行以下命令,瞧:

export LC_ALL="en_US.UTF-8"

关于python - pip 安装 UnicodeDecodeError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25036897/

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