2014-02-06 51 views
0

所以我在嘗試安裝更多版本的python(2.6,3.3)以嘗試獲取PyDev以使eclipse正常工作時在我的python中創建了一些問題。試圖重新安裝python2.7 mac

這與我的Python 2.7

的(當時)工作版本引起的問題吧,我重新安裝Python 2.7版。從終端我可以鍵入$python2.7並得到:

$ python2.7 
    Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54) 
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin 
    Type "help", "copyright", "credits" or "license" for more information. 
    >>> import sys 
    >>> sys.path 
    ['', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] 

對我來說這是一個好兆頭。

然後,當我去$easy_install scipy我得到:

$ easy_install scipy 
    error: can't create or remove files in install directory 

    The following error occurred while trying to add or remove files in the 
    installation directory: 

     [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/test-easy-install-20589.write-test' 

    The installation directory you specified (via --install-dir, --prefix, or 
    the distutils default setting) was: 

     /Library/Python/2.7/site-packages/ 

    This directory does not currently exist. Please create it and try again, or 
    choose a different installation directory (using the -d or --install-dir 
    option). 

所以,這一點,我試圖讓它從黑暗的一面回來,並獲得2.7備份和運行。感謝您的任何幫助

+0

您是否嘗試過做什麼它告訴你這樣做,創造'/圖書館/ Python的/ 2.7 /站點包/'? – jayelm

+0

誰會做什麼事情告訴他們做什麼?似乎工作。謝謝。希望別人能從我的愚蠢之路中受益。如果你想發表一個答案,我會盡快接受我的願望。 –

+0

嘿,我明白了。充斥着令人生畏的命令行錯誤消息的直接本能是逃跑並致電911。 – jayelm

回答

1

您可能會錯過符號鏈接到您的python安裝。在命令行中嘗試:

sudo ln -s /Library/Frameworks/Python.framework/Versions/2.7 /Library/Python/2.7