您的位置:首页 > 编程语言 > Python开发

mac os 下安装python与Scrapy

2015-09-20 00:07 295 查看

安装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


报错 No module named twisted.internet

在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 install 
w3lib

再次执行  scrapy startproject demo1

成功 

运行项目时报错

No module named cryptography.hazmat.bindings.openssl.binding

 

 执行  pip install crpytography 

成功

转载于:https://www.cnblogs.com/jjl513863548/p/4822648.html

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: