V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
gavin6liu
V2EX  ›  Python

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

  •  
  •   gavin6liu ·
    gavinliu · 2015-11-14 18:21:38 +08:00 · 4231 次点击
    这是一个创建于 3282 天前的主题,其中的信息可能已经有所发展或是发生改变。
    安装的时候说 six 不对,发现苹果已经预装了 six ,就忽略 six ,安装成功后,运行 scrapy ,说 six 有问题。系统又不让卸载预装的 six ,这个局如何解?
    10 条回复    2015-11-15 10:53:06 +08:00
    gavin6liu
        1
    gavin6liu  
    OP
       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
        2
    gavin6liu  
    OP
       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: [email protected]
    License: UNKNOWN
    Location: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
    Requires:
    gavin6liu
        3
    gavin6liu  
    OP
       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
        4
    yishenggudou  
       2015-11-14 18:26:34 +08:00   ❤️ 1
    虚拟环境
    limbo0
        5
    limbo0  
       2015-11-14 18:51:45 +08:00
    ls 正解, 不过 el 系统没有遇到这个错误
    patrickstar
        6
    patrickstar  
       2015-11-14 18:56:38 +08:00
    用 Anaconda 吧,安装都相当简单,也支持 pip 安装和虚拟环境等。
    aisk
        7
    aisk  
       2015-11-14 19:03:09 +08:00
    用系统自带 Python / Ruby 还往全局装包就是作大死。推荐 homebrew 。
    gavin6liu
        8
    gavin6liu  
    OP
       2015-11-14 20:00:47 +08:00
    @aisk 是用 brew 重新装个 python 吗?
    gavin6liu
        9
    gavin6liu  
    OP
       2015-11-14 20:01:34 +08:00
    @yishenggudou thinks~~ 初学 python ,新技能 get
    aisk
        10
    aisk  
       2015-11-15 10:53:06 +08:00
    @gavin6liu 嗯。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2817 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 02:09 · PVG 10:09 · LAX 18:09 · JFK 21:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.