你们在 el capitan 运行上 scrapy 了吗?

2015-11-14 18:21:38 +08:00
 gavin6liu
安装的时候说 six 不对,发现苹果已经预装了 six ,就忽略 six ,安装成功后,运行 scrapy ,说 six 有问题。系统又不让卸载预装的 six ,这个局如何解?
4240 次点击
所在节点    Python
10 条回复
gavin6liu
2015-11-14 18:22:08 +08:00
pip uninstall six
```
OSError: [Errno 1] Operation not permitted: '/var/folders/fg/rzz7b0b57bb0vz79t903yqc00000gn/T/pip-lhVUMQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
```
gavin6liu
2015-11-14 18:22:50 +08:00
pip show six
---
Metadata-Version: 1.1
Name: six
Version: 1.4.1
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
Author-email: benjamin@python.org
License: UNKNOWN
Location: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Requires:
gavin6liu
2015-11-14 18:23:19 +08:00
scrapy

Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/Library/Python/2.7/site-packages/scrapy/__init__.py", line 48, in <module>
from scrapy.spiders import Spider
File "/Library/Python/2.7/site-packages/scrapy/spiders/__init__.py", line 10, in <module>
from scrapy.http import Request
File "/Library/Python/2.7/site-packages/scrapy/http/__init__.py", line 12, in <module>
from scrapy.http.request.rpc import XmlRpcRequest
File "/Library/Python/2.7/site-packages/scrapy/http/request/rpc.py", line 7, in <module>
from six.moves import xmlrpc_client as xmlrpclib
yishenggudou
2015-11-14 18:26:34 +08:00
虚拟环境
limbo0
2015-11-14 18:51:45 +08:00
ls 正解, 不过 el 系统没有遇到这个错误
patrickstar
2015-11-14 18:56:38 +08:00
用 Anaconda 吧,安装都相当简单,也支持 pip 安装和虚拟环境等。
aisk
2015-11-14 19:03:09 +08:00
用系统自带 Python / Ruby 还往全局装包就是作大死。推荐 homebrew 。
gavin6liu
2015-11-14 20:00:47 +08:00
@aisk 是用 brew 重新装个 python 吗?
gavin6liu
2015-11-14 20:01:34 +08:00
@yishenggudou thinks~~ 初学 python ,新技能 get
aisk
2015-11-15 10:53:06 +08:00
@gavin6liu 嗯。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/236207

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX