pip install scrapy
安装提示出错Traceback (most recent call last):
File "C:\Users\Administrator.GZLX--20160720J\AppData\Local\Programs\Python\Pyt
hon36\Scripts\pip-script.py", line 6, in
from pkg_resources import load_entry_point
File "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\pyt
hon36\lib\site-packages\pkg_resources\__init__.py", line 3017, in
@_call_aside
File "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\pyt
hon36\lib\site-packages\pkg_resources\__init__.py", line 3003, in _call_aside
f(*args, **kwargs)
File "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\pyt
hon36\lib\site-packages\pkg_resources\__init__.py", line 3030, in _initialize_ma
ster_working_set
working_set = WorkingSet._build_master()
File "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\pyt
hon36\lib\site-packages\pkg_resources\__init__.py", line 659, in _build_master
ws.require(__requires__)
File "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\pyt
hon36\lib\site-packages\pkg_resources\__init__.py", line 967, in require
needed = self.resolve(parse_requirements(requirements))
File "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\pyt
hon36\lib\site-packages\pkg_resources\__init__.py", line 853, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==9.0.1' distribution was not found
and is required by the application
easy_install pip==9.0.1
查看,pip --version
,提示You are using pip version 9.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
python -m pip install --upgrade pip
升级,再次错误提示Requirement already up-to-date: pip in c:\users\administrator.gzlx--20160720j\a
pdata\local\programs\python\python36\lib\site-packages (19.0.1)
python -m pip install --upgrade pip
,pip升级成功。pip install scrapy
,提示 running build_ext
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "c:\users\administrator.gzlx--20160720j\appdata\local\programs\python\py
thon36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ADMINI
~1.GZL\\AppData\\Local\\Temp\\pip-install-nqcev6r7\\Twisted\\setup.py';f=getattr
(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close()
;exec(compile(code, __file__, 'exec'))" install --record C:\Users\ADMINI~1.GZL\A
ppData\Local\Temp\pip-record-wnhyvcyx\install-record.txt --single-version-extern
ally-managed --compile" failed with error code 1 in C:\Users\ADMINI~1.GZL\AppDat
a\Local\Temp\pip-install-nqcev6r7\Twisted\
pip install C:\Users\Administrator.GZLX--20160720J\Downloads\Twisted-18.9.0-cp36-cp36m-win_amd64.whl
Installing collected packages: Twisted
Successfully installed Twisted-18.9.0
7.再次运行pip install scrapy
,提示安装成功
Installing collected packages: scrapy
Successfully installed scrapy-1.5.2
8、安装windows环境依赖包pip install pypiwin32