安装setuotool
执行该命令 curl https://bootstrap.pypa.io/ez_setup.py -o - | python
mac OS 自带python 2.7.6 从官网下载2.7.9安装后,在终端输入python 自动改变为2.7.9版本,且自带pip
执行pip install scrapy
报错Perhaps your account does not have write access to this directory? 加上sudo
执行sudo pip install scrapy
仍然报错
打开终端 执行 xcode-select --install
安装成功
执行
scrapy startproject demo1
在Stack Overflow 找到
f you use pip just try:
pip install twisted
The same works with w3lib and lxml.
执行pip install twisted
再次执行 scrapy startproject demo1
报错No module named w3lib.http
执 行 pip installw3lib
再次执行 scrapy startproject demo1
成功
运行项目时报错
No module named cryptography.hazmat.bindings.openssl.binding
执行 pip install crpytography
成功
本文介绍了在Mac上安装Scrapy的过程。先安装setuotool,因自带Python版本问题需从官网下载2.7.9并安装pip。执行安装Scrapy命令时多次报错,通过安装xcode-select、twisted、w3lib等,最终成功创建项目,运行项目时又因缺少模块报错,安装cryptography后解决问题。
844

被折叠的 条评论
为什么被折叠?



