1、conda安装
conda install Scrapy或者conda install -c conda-forge scrapy安装的版本可能不是最新的:
C:\Users\m>conda search scrapy
Loading channels: done
# Name Version Build Channel
scrapy 0.16.4 py26_0 pkgs/free
scrapy 0.16.4 py27_0 pkgs/free
scrapy 0.24.4 py27_0 pkgs/free
scrapy 1.0.1 py27_0 pkgs/free
scrapy 1.0.3 py27_0 pkgs/free
scrapy 1.1.1 py27_0 pkgs/free
scrapy 1.1.1 py34_0 pkgs/free
scrapy 1.1.1 py35_0 pkgs/free
scrapy 1.1.1 py36_0 pkgs/free
scrapy 1.3.3 py27_0 pkgs/free
scrapy 1.3.3 py35_0 pkgs/free
scrapy 1.3.3 py36_0 pkgs/free
scrapy 1.4.0 py27h4eaa785_1 pkgs/main
scrapy 1.4.0 py35h054a469_1 pkgs/main
scrapy 1.4.0 py36h764da0a_1 pkgs/main
scrapy 1.5.0 py27_0 pkgs/main
scrapy 1.5.0 py35_0 pkgs/main
scrapy 1.5.0 py36_0 pkgs/main
scrapy 1.5.1 py27_0 pkgs/main
scrapy 1.5.1 py35_0 pkgs/main
scrapy 1.5.1 py36_0 pkgs/main
scrapy 1.5.1 py37_0 pkgs/main
scrapy 1.5.2 py27_0 pkgs/main
scrapy 1.5.2 py36_0 pkgs/main
scrapy 1.5.2 py37_0 pkgs/main
scrapy 1.6.0 py27_0 pkgs/main
scrapy 1.6.0 py36_0 pkgs/main
scrapy 1.6.0 py37_0 pkgs/main
scrapy 1.6.0 py38_0 pkgs/main
而且总是报错:
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(502): An error occurred while installing package 'defaults::automat-0.8.0-py_0'.
CondaError: Cannot link a source that does not exist. D:\Anaconda3\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Attempting to roll back.
2、pip安装
C:\Users\m>pip install scrapy
报了一个错:
automat 20.2.0 has requirement attrs>=19.2.0, but you'll have attrs 18.1.0 which is incompatible.
命令行安装最新版本,或者指定一个版本:
C:\Users\m>pip install attrs==19.3
安装成功后再次运行pip install scrapy。
damaohao88 发布了52 篇原创文章 · 获赞 59 · 访问量 57万+ 私信 关注