killpanda
V2EX  ›  macOS

升级完山狮之后 pip 悲剧了

  •  
  •   killpanda · Jul 26, 2012 · 5305 views
    This topic created in 5046 days ago, the information mentioned may be changed or developed.
    升级完山狮之后,pip 没法用了,报错大概是因为这个

    raise DistributionNotFound(req)

    而且用 pip 以前下载的包也没了,这下有点烦
    12 replies    1970-01-01 08:00:00 +08:00
    iwinux
        1
    iwinux  
       Jul 26, 2012
    Python默认版本有变化?
    killpanda
        2
    killpanda  
    OP
       Jul 26, 2012
    @iwinux 没注意 我一直用的官网的2.7
    iwinux
        3
    iwinux  
       Jul 26, 2012
    @killpanda 你看看 /Library/Python/2.7/site-packages 里有啥
    allenm
        4
    allenm  
       Jul 26, 2012
    重新 sudo easy_install pip
    然后再把需要的包装一遍 。。。。
    okidogi
        5
    okidogi  
       Jul 27, 2012
    要及时freeze,然后装起来就一个命令,不然多悲剧阿。

    平时没事儿的时候
    * freeze
    pip freeze requirements.pip

    当需要重装的时候
    * install
    pip install -r requirements.pip
    okidogi
        6
    okidogi  
       Jul 27, 2012
    额,pip freeze > requirements.pip
    killpanda
        7
    killpanda  
    OP
       Jul 27, 2012
    @iwinux @allenm @okidogi 感谢大伙儿
    jfding
        8
    jfding  
       Jul 27, 2012   ❤️ 1
    1. sudo easy_install pip
    2. sudo pip install virtualenv
    3. install everything under virtualenv env
    jeff_kit
        9
    jeff_kit  
       Jul 29, 2012
    不仅是pip,python全新安装了,原来装的东西都没有了。好像path也改到/system下面了。悲剧。都要重装?
    coldear
        10
    coldear  
       Jul 30, 2012
    好像是需要装xcode的command line tools
    from0tohero
        11
    from0tohero  
       Aug 1, 2012
    >>> sys.prefix
    '/System/Library/Frameworks/Python.framework/Versions/2.7'
    貌似现在的位置在这里
    囧,弄了一晚上才发现换地方了。。。求指导如何装BeautifulSoup。。。
    from0tohero
        12
    from0tohero  
       Aug 1, 2012
    @jeff_kit 貌似是的。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3721 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 04:26 · PVG 12:26 · LAX 21:26 · JFK 00:26
    ♥ Do have faith in what you're doing.