无法安装Scrapy/Twisted [英] Can't instal Scrapy/Twisted

查看:114
本文介绍了无法安装Scrapy/Twisted的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用"pip install"在Windows上为Python安装scrapy时,我请求以下反馈:

When I use "pip install" to install scrapy for Python on Windows, I request this feedback:

Exception:
Traceback (most recent call last):
  File "c:\users\limin\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 0xb6 in position 30: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\limin\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\limin\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\limin\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\limin\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\users\limin\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\limin\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 0xb6 in position 30: invalid start byte

我知道这可能是编码问题,但我不知道如何解决. 谁能帮我? 谢谢.

I know it maybe a coding problem, but I don't know how to solve it. Who can help me? Thanks.

推荐答案

Scrapy在Python 2.7和Python 3.3或更高版本上运行(在Windows上尚不支持Python 3除外).

Scrapy runs on Python 2.7 and Python 3.3 or above (except on Windows where Python 3 is not supported yet).

很抱歉成为坏消息的承担者.如果您特别想使用Python 3.6,那么使用Anaconda是值得的,这在Scrapy文档中也有说明.或者,如果很紧急,则可以使用Python 2.7和pip install scrapy.根据我的经验,在Scrapy中使用Python 2.7会更好.

Sorry to be the bearer of bad news. It's worth a chance to use Anaconda, which is also stated in the Scrapy docs, if you're particularly hell bent on using Python 3.6. Or if it's urgent, you can use Python 2.7 and pip install scrapy. From my experience, Python 2.7 works a lot better when in comes to Scrapy.

这篇关于无法安装Scrapy/Twisted的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆