解决:Python3.6下安装scrapy出现的问题

问题背景:安装scrapy
pip install scrapy  
或者
pip install -i https://pypi.douban.com/simple scrapy

可能会报出:
错误1


image1.png

错误2


Image 2.png
解决:
1.解决错误1----》

进入
https://www.lfd.uci.edu/~gohlke/pythonlibs/
1)搜索lxml
https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
查找对应版本,3.6找cp36,2.7找cp27,我的是3.6

Image 3.png

2)下载到指定目录:例如E:\python
3)进入到指定目录,进入虚拟环境
E:\python>workon scrapy
4)安装:
pip install lxml-4.3.1-cp36-cp36m-win_amd64.whl
显示successfully

如果不成功,换成win32

5)重新安装scrapy
进入虚拟环境
pip install scrapy
或者
pip install -i https://pypi.douban.com/simple scrapy

2、解决错误2----》

进入https://www.lfd.uci.edu/~gohlke/pythonlibs/
1)搜索teisted
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
查找对应版本,3.6找cp36,2.7找cp27,我的是3.6

Image 4.png

2)下载到指定目录:例如E:\python
3)进入到指定目录,进入虚拟环境
E:\python>workon scrapy
4)安装:
pip install Twisted-18.9.0-cp36-cp36m-win_amd64.whl
显示successfully

如果显示:

Twisted-18.9.0-cp36-none-win64.whl is not a supported wheel on this platform.

换成win32

5)重新安装scrapy
进入虚拟环境
pip install scrapy
或者
pip install -i https://pypi.douban.com/simple scrapy

你可能感兴趣的:(解决:Python3.6下安装scrapy出现的问题)