pip install scrapy报错

报错:
Traceback (most recent call last):
File "D:/SoftwareAndProgram/program/Python/l0x8df/main.py", line 4, in
from scrapy.cmdline import execute
ImportError: No module named scrapy.cmdline

image.png

需要pip安装scrapy:
pip install scrapy

报错:
RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools

先升级:

pip3 install -U setuptools

然后继续
pip install scrapy
报错:


image.png

是因为pip版本过低:
pip --version 查看版本

升级pip:

pip升级安装

有时候安装软件出错,可能是pip的版本过低导致,这个时候就要升级pip了。

1、查看pip的版本号

pip --version

2、升级方法

On Linux or OS X:

pip install -U pip

On Windows:

python -m pip install -U pip

升级完成后继续安装:
pip install scrapy

报错:


image.png
ERROR: MICROSOFT VISUAL C++ 9.0 IS REQUIRED (UNABLE TO FIND VCVARSALL.BAT). GET IT FROM HTTP://AKA.MS/VCPYTHON27

在Windows下用pip安装Scrapy报如下错误,看错误提示就知道去http://aka.ms/vcpython27找解决方法了

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27

打开http://aka.ms/vcpython27会跳转到
http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

将安装包下载

Microsoft Visual C++ Compiler for Python 2.7

回来安装即可解决问题

升级完成后继续安装成功:
pip install scrapy

image.png

你可能感兴趣的:(pip install scrapy报错)