1.安装环境
windows10 64-bit2.安装Anaconda
从 https://www.continuum.io/downloads 下载安装包
3.安装Scrapy
安装完成后,打开 cmd ,输入
conda list
命令就可以看看 Anaconda 所带的库。
我们发现并没有自带 Scrapy,所以自己动手装吧。(这里指定安装0.24版本)
conda install scrapy=0.24
如果安装过程中网络或其他问题导致卡住,退出Anaconda后在安装会报一个错误:
LOCKERROR: It looks like conda is already doing something.
The lock [u'D:\\Anaconda2\\pkgs\\.conda_lock-5112'] was found. Wait for it t
o finish before continuing.
If you are sure that conda is not running, remove it and try again.
You can also use: $ conda clean --lock
执行下面的命令,再安装一次:
conda clean --lock
4.创建一个新的 Scrapy 项目
scrapy startproject tutorial
但此时报了一个错误:
You do not have a working installation of the service_identity module…………(后面省略若干)
这里由于缺乏 service_identity 这个库,Scrapy 无法正常运行,所以我们手动安装一下:
conda install service_identity
重新创建一个 Scrapy 项目,这次成功了