输入此命令python setup.py installc. 如果出现以下错误:Traceback (most rece

时间:2022-01-16 04:17:19

标签:scrapy

##windows7 安置 Scrapy##

1.打开cmd.exe输入命令:

C:\Users\admin>python 先看是否已经安置python,没有就安置python,此处省略安置python。

2.假设已经安置有python,检察是否已经安置好pip

C:\Users\admin>pip a. 没有就去下载pip 网址如下:https://pypi.python.org/pypi/pip#downloads 下载这个压缩包:pip-9.0.1.tar.gz (md5, pgp) b. 解压到指定目录,进入pip-9.0.1目录,,输入此命令 python setup.py install c. 如果呈现以下错误: Traceback (most recent call last): File "setup.py", line 31, in <module> from setuptools import setup, find_packages ImportError: No module named setuptools d. 就安置setuptools: 网址:https://pypi.python.org/pypi/setuptools 下载这个压缩包:setuptools-38.5.2.zip (md5) f. 解压到指定目录,进入setuptools-38.5.2目录,输入此命令 python setup.py install g. 如果呈现以下错误: running build_ext building ‘twisted.test.raiser‘ extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": 网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted h. 下载二选一: Twisted?17.9.0?cp36?cp36m?win_amd64.whl(看系统位数下载) Twisted?17.9.0?cp36?cp36m?win32.whl(看系统位数下载)

3.安置scrapy

C:\Users\admin>pip install Scrapy 告成后提示: Installing collected packages: Scrap Successfully installed Scrapy-1.5.0

4.如果运行scapy crawl quotes【quotes是项目名字】报错,就安置pypiwin32

C:\Users\admin>pip install pypiwin32

5.再次运行就会告成

windows7 安置 Scrapy