windows 上安裝 pip 和 scrapy
阿新 • • 發佈:2019-01-28
scrapy 有版本限制 python2.7
1 安裝python
[python下載](https://www.python.org/downloads/)
下載之後點選安裝即可
設定環境變數 將python.exe路徑加入到PATH即可
2 安裝pip
方法一:
[pip下載](https://bootstrap.pypa.io/get-pip.py)
安裝
python get-pip.py
方法二:
方法一會可能會遇到 安裝的時候 read time out
可以採用
下載 pip-9.0.1.tar.gz https://pypi.python .org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
解壓
執行
python setup.py install
3 安裝scrapy
python -m pip install scrapy
在最後一步經常會遇到這樣的問題
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org' , port=443): Read ti med out.
解決方法可以利用國內的源進行下載
python -m pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ scrapy
映象源
阿里雲 速度最快 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban .com/simple/
Python官方 https://pypi.python.org/simple/
v2ex http://pypi.v2ex.com/simple/
中國科學院 http://pypi.mirrors.opencas.cn/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/