python3.6安装Scrapy出现以下错误怎么解决

 我来答
从空去听8
2017-11-16 · TA获得超过7439个赞
知道大有可为答主
回答量:6907
采纳率:93%
帮助的人:5504万
展开全部
Running setup.py install for pycparser ... done
Running setup.py install for zope.interface ... error
Exception:
Traceback (most recent call last):
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 72: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\46782\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 72: invalid start byte
使用的是pip3 install scrapy 命令。
打开c:\program files\python36\lib\site-packages\pip\compat\__init__.py约75行
return s.decode('utf_8') 改为return s.decode('cp936')
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式