python怎么安装scrapy_python2.7安装Scrapy
winows python2.7
安裝
Scrapy
官方文檔:
http://doc.scrapy.org/en/latest/intro/install.html#intro-install-platform-notes
需要提前安裝的(官方文檔)
:
The installation steps assume that you have the following things installed:
1. Python 2.7
2.
pip
and
setuptools
Python
packages.
Nowadays
pip
requires
and
installs
setuptools
if
not
installed. Python 2.7.9 and later include pip by default, so you may have it already.
3.
lxml.
Most
Linux
distributions
ships
prepackaged
versions
of
lxml.
Otherwise
refer
to
http://lxml.de/installation.html
4. OpenSSL. This comes preinstalled in all operating systems, except Windows where the Python
installer ships it bundled.
1. Python
已經安裝了
2.7.11
版本。
2. pip and setuptools
因為是
Python2.7.9
之后的版本,默認已經安裝了
pip
了,不過,后面有提示,安裝的
pip
版本過低,然后會提示你更新
pip
版本的命令:
python -m pip install --upgrade pip
更新完為
8.1.1
版本。
3. lxml
下載
官網:
https://pypi.python.org/pypi/lxml/3.3.1
找對應的下載包,我這是
win32-py2.7.exe
的包。下載完雙擊安裝就行。
4. OpenSSL
下載地址:
https://launchpad.net/pyopenssl
這里找了個
win32-py2.7.msi
下載,也是雙擊安裝就行。
Windows
下安裝
Scrapy
1.
添加環境變量
先把
Python27
以及它的
Scripts
目錄添加到
PATH
的環境變量中。
C:\Python27\;C:\Python27\Scripts\;
2.
測試
在命令提示符中運行以下命令,看環境變量是否成功添加
python --version
3.
安裝
pywin32
下載地址:
http://sourceforge.net/projects/pywin32/
因為之前要把
python
項目打包成
exe
文件,所以已經安裝了
pywin32
了。
python2.7
的也可以這里下載:
http://download.csdn.net/download/lanlandechong/4367925
總結
以上是生活随笔為你收集整理的python怎么安装scrapy_python2.7安装Scrapy的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: eclipse android开发环境搭
- 下一篇: python自定义函数画图_4.1-5