自己尝试安装:

第一种:pip install scrapy。直接报错!

第二种:半天都没有下载好!

网上寻找解决办法:

下载所需模块的.whl文件,然后再以pip的形式安装

常用模块whl文件得下载地址:​​https://www.lfd.uci.edu/~gohlke/pythonlibs/​

百度网盘备份,虽然没啥用。因为我备份的是3.8版本的。

链接:https://pan.baidu.com/s/18getnvE5PbfivyJ0J-XakQ 
提取码:59tg

用cmd进入文件所存储的地方。

解决scrapy安装失败_3c

 

解决scrapy安装失败_3c_02

使用命令安装:

pip install Twisted-19.2.1-cp36-cp36m-win32.whl

遇到报错:

解决scrapy安装失败_python_03

这是因为,我下载的是3.5系列的。但是本机的python却是3.8系列的。

那就再下一个3.8系列的。

但是要安装wheel,

具体两个命令:

pip install wheel -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

 要进入你在‘’

之后所存放的文件夹里面!

pip install Twisted-19.10.0-cp38-cp38-win32.whl

解决scrapy安装失败_3c_04

安装scrapy :

pip install scrapy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

成功:

D:\11111111>pip install scrapy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting scrapy
Downloading http://pypi.doubanio.com/packages/3b/e4/69b87d7827abf03dea2ea984230d50f347b00a7a3897bc93f6ec3dafa494/Scrapy-1.8.0-py2.py3-none-any.whl (238 kB)
|████████████████████████████████| 238 kB 409 kB/s
Requirement already satisfied: lxml>=3.5.0 in d:\python_install\lib\site-packages (from scrapy) (4.5.0)
Requirement already satisfied: Twisted>=17.9.0; python_version >= "3.5" in d:\python_install\lib\site-packages (from scrapy) (19.10.0)
Collecting parsel>=1.5.0
Downloading http://pypi.doubanio.com/packages/86/c8/fc5a2f9376066905dfcca334da2a25842aedfda142c0424722e7c497798b/parsel-1.5.2-py2.py3-none-any.whl (12 kB)
Collecting pyOpenSSL>=16.2.0
Downloading http://pypi.doubanio.com/packages/9e/de/f8342b68fa9e981d348039954657bdf681b2ab93de27443be51865ffa310/pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
|████████████████████████████████| 53 kB 302 kB/s
Requirement already satisfied: zope.interface>=4.1.3 in d:\python_install\lib\site-packages (from scrapy) (4.7.1)
Collecting queuelib>=1.4.2
Downloading http://pypi.doubanio.com/packages/4c/85/ae64e9145f39dd6d14f8af3fa809a270ef3729f3b90b3c0cf5aa242ab0d4/queuelib-1.5.0-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: cssselect>=0.9.1 in d:\python_install\lib\site-packages (from scrapy) (1.1.0)
Collecting cryptography>=2.0
Downloading http://pypi.doubanio.com/packages/74/e1/6e360b4dbd2a63c1f506402bfa6fa56aa5826337830d8ee86e5e2ec9457b/cryptography-2.8-cp38-cp38-win32.whl (1.3 MB)
|████████████████████████████████| 1.3 MB 409 kB/s
Collecting protego>=0.1.15
Downloading http://pypi.doubanio.com/packages/db/6e/bf6d5e4d7cf233b785719aaec2c38f027b9c2ed980a0015ec1a1cced4893/Protego-0.1.16.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 204 kB/s
Collecting PyDispatcher>=2.0.5
Downloading http://pypi.doubanio.com/packages/cd/37/39aca520918ce1935bea9c356bcbb7ed7e52ad4e31bff9b943dfc8e7115b/PyDispatcher-2.0.5.tar.gz (34 kB)
Collecting service-identity>=16.0.0
Downloading http://pypi.doubanio.com/packages/e9/7c/2195b890023e098f9618d43ebc337d83c8b38d414326685339eb024db2f6/service_identity-18.1.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: six>=1.10.0 in d:\python_install\lib\site-packages (from scrapy) (1.14.0)
Collecting w3lib>=1.17.0
Downloading http://pypi.doubanio.com/packages/6a/45/1ba17c50a0bb16bd950c9c2b92ec60d40c8ebda9f3371ae4230c437120b6/w3lib-1.21.0-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: incremental>=16.10.1 in d:\python_install\lib\site-packages (from Twisted>=17.9.0; python_version >= "3.5"->scrapy) (17.5.0)
Requirement already satisfied: PyHamcrest>=1.9.0 in d:\python_install\lib\site-packages (from Twisted>=17.9.0; python_version >= "3.5"->scrapy) (2.0.1)
Requirement already satisfied: constantly>=15.1 in d:\python_install\lib\site-packages (from Twisted>=17.9.0; python_version >= "3.5"->scrapy) (15.1.0)
Requirement already satisfied: Automat>=0.3.0 in d:\python_install\lib\site-packages (from Twisted>=17.9.0; python_version >= "3.5"->scrapy) (20.2.0)
Requirement already satisfied: hyperlink>=17.1.1 in d:\python_install\lib\site-packages (from Twisted>=17.9.0; python_version >= "3.5"->scrapy) (19.0.0)
Requirement already satisfied: attrs>=17.4.0 in d:\python_install\lib\site-packages (from Twisted>=17.9.0; python_version >= "3.5"->scrapy) (19.3.0)
Requirement already satisfied: setuptools in d:\python_install\lib\site-packages (from zope.interface>=4.1.3->scrapy) (41.2.0)
Collecting cffi!=1.11.3,>=1.8
Downloading http://pypi.doubanio.com/packages/0a/e4/cb57bf30f98fc7c36c0db2759b875d3990ad531a8f2e9e535da2bdcc138f/cffi-1.14.0-cp38-cp38-win32.whl (165 kB)
|████████████████████████████████| 165 kB 218 kB/s
Collecting pyasn1-modules
Downloading http://pypi.doubanio.com/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
|████████████████████████████████| 155 kB 409 kB/s
Collecting pyasn1
Downloading http://pypi.doubanio.com/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
|████████████████████████████████| 77 kB 261 kB/s
Requirement already satisfied: idna>=2.5 in d:\python_install\lib\site-packages (from hyperlink>=17.1.1->Twisted>=17.9.0; python_version >= "3.5"->scrapy) (2.9)
Collecting pycparser
Downloading http://pypi.doubanio.com/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158 kB)
|████████████████████████████████| 158 kB 409 kB/s
Building wheels for collected packages: protego, PyDispatcher, pycparser
Building wheel for protego (setup.py) ... done
Created wheel for protego: filename=Protego-0.1.16-py3-none-any.whl size=7769 sha256=7c7affbcce4c36202cee62463f8207a14c9e01690f1a2614a7ee0692b64ef664
Stored in directory: c:\users\hwp\appdata\local\pip\cache\wheels\23\c5\c6\4820dd2a851e2a22bed45b753b285a8c633358657fcdbb04ef
Building wheel for PyDispatcher (setup.py) ... done
Created wheel for PyDispatcher: filename=PyDispatcher-2.0.5-py3-none-any.whl size=12552 sha256=6bc87e54e41a611d69f50bf23f2f44d4c148aa0489ca7806c999f69f48396eb4
Stored in directory: c:\users\hwp\appdata\local\pip\cache\wheels\68\92\92\9542f6e348ee0fcdcec3c1b492956c4d94a511cc2b4e2cf989
Building wheel for pycparser (setup.py) ... done
Created wheel for pycparser: filename=pycparser-2.19-py2.py3-none-any.whl size=111069 sha256=bc1e191167030694153585c892cee8a76184fceb866cb0b65375ae614157552b
Stored in directory: c:\users\hwp\appdata\local\pip\cache\wheels\0d\13\6a\2b3268e1dcd6d273e3a3e06d65a38bdd80b85cc917db622497
Successfully built protego PyDispatcher pycparser
Installing collected packages: w3lib, parsel, pycparser, cffi, cryptography, pyOpenSSL, queuelib, protego, PyDispatcher, pyasn1, pyasn1-modules, service-identity, scrapy
Successfully installed PyDispatcher-2.0.5 cffi-1.14.0 cryptography-2.8 parsel-1.5.2 protego-0.1.16 pyOpenSSL-19.1.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.19 queuelib-1.5.0 scrapy-1.8.0 service-identity-18.1.0 w3lib-1.21.0

D:\11111111>

截图:

解决scrapy安装失败_3c_05