python安装Scrapy踩过的坑以及安装指导

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/dreamzuora/article/details/89021876

在pyCharm中的setting中直接添加包然后报错,然后利用window控制台pip install 报错异常:

Command "python setup.py egg_info" failed with error code 1

第一步:准备更新pip,利用以下指令

python -m pip install --upgrade pip

注意:这种方式抛出了异常:

AttributeError: 'NoneType' object has no attribute 'bytes'

报错改用(window下用该指令)

easy_install -U pip

安装成功后再次安装报错,终于不是同一个错误

 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
    

第二步:安装visual c++,下载地址:https://pan.baidu.com/s/1eR5awgPrkNX8fT008-E4Ww(引用别的博客地址)

安装visual C++需要等待二十多分钟...耐心,切记安装的时候不要选择默认,默认是window 8环境,如果你是win10最后安装会提示一个错误信息。

error: command 'cl.exe' failed: No such file or directory

这个错误信息就是你是win10机器而选用默认win8的情况报错信息,因此我重新选自定义安装后就成功了!

第三步:安装完后安装twisted,我选择是在pyChram的setting->Project Interpreter中安装包的,等一分钟就好了

pip install Twisted

如果用的pip指令注意版本问题,反正我使用的pyCharm傻瓜式安装,所以pip install出问题我没总结

第四步:安装Srcapy,我是在pyCharm中安装的,等十几秒就好了

pip install Scrapy

引用博客地址:

https://blog.csdn.net/qq_37788558/article/details/79049410

https://blog.csdn.net/shuiyihang0981/article/details/84673171#commentBox

https://blog.csdn.net/u010899985/article/details/79165325

猜你喜欢

转载自blog.csdn.net/dreamzuora/article/details/89021876