V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
lisir
V2EX  ›  问与答

Python 执行文件报如下问题,求解答( stackoverflow 上尝试各种方法不奏效)

  •  
  •   lisir · 2017-02-17 11:52:19 +08:00 · 1860 次点击
    这是一个创建于 2623 天前的主题,其中的信息可能已经有所发展或是发生改变。

    1.运行一个 python 文件报错,如下:ImportError: cannot import name xmlrpc_client

    2.按照“ http://stackoverflow.com/questions/30964836/scrapy-throws-importerror-cannot-import-name-xmlrpc-client ” 来解决,爆如下错误 [ rm: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info: Operation not permitted rm:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.py: Operation not permitted rm:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc: Operation not permitted ]

    6 条回复    2017-02-17 18:05:12 +08:00
    engHacker
        1
    engHacker  
       2017-02-17 12:53:50 +08:00 via iPhone
    pip install --ignore-installed six

    不行就

    sudo -H pip install --ignore-installed six
    lisir
        2
    lisir  
    OP
       2017-02-17 14:25:58 +08:00
    这个试过了,是安装“ six-1.10.0 ”。

    解决不了问题。
    lisir
        3
    lisir  
    OP
       2017-02-17 14:26:50 +08:00
    @engHacker 这个试过了,是安装“ six-1.10.0 ”。

    解决不了问题。
    naomhan
        4
    naomhan  
       2017-02-17 17:20:04 +08:00
    Operation not permitted
    ty89
        5
    ty89  
       2017-02-17 17:56:42 +08:00
    rm 的时候你少了 sudo 吧
    DuckJK
        6
    DuckJK  
       2017-02-17 18:05:12 +08:00
    试试 virtualenv ,从头安装依赖包。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5786 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 409ms · UTC 01:49 · PVG 09:49 · LAX 18:49 · JFK 21:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.