lisir
V2EX  ›  问与答

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

  •  
  •   lisir · Feb 17, 2017 · 3118 views
    This topic created in 3547 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
    engHacker
    Feb 17, 2017 via iPhone
    1
    pip install --ignore-installed six

    不行就

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

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

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