lisir
V2EX  ›  问与答

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

  •  
  •   lisir · Feb 17, 2017 · 2724 views
    This topic created in 3377 days ago, the information mentioned may be changed or developed.

    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 replies    2017-02-17 18:05:12 +08:00
    engHacker
        1
    engHacker  
       Feb 17, 2017 via iPhone
    pip install --ignore-installed six

    不行就

    sudo -H pip install --ignore-installed six
    lisir
        2
    lisir  
    OP
       Feb 17, 2017
    这个试过了,是安装“ six-1.10.0 ”。

    解决不了问题。
    lisir
        3
    lisir  
    OP
       Feb 17, 2017
    @engHacker 这个试过了,是安装“ six-1.10.0 ”。

    解决不了问题。
    naomhan
        4
    naomhan  
       Feb 17, 2017
    Operation not permitted
    ty89
        5
    ty89  
       Feb 17, 2017
    rm 的时候你少了 sudo 吧
    DuckJK
        6
    DuckJK  
       Feb 17, 2017
    试试 virtualenv ,从头安装依赖包。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3672 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 04:50 · PVG 12:50 · LAX 21:50 · JFK 00:50
    ♥ Do have faith in what you're doing.