2012-02-16 51 views
0

我已經使用Macports在我的MacBook Pro(OS X 10.6.8)上安裝了python27。下面是輸出爲sudo port select --list python爲什麼當我使用Macports選擇了一個不同的python時,我的系統python運行?

Available versions for python: 
    none 
    python25-apple 
    python26-apple 
    python27 (active) 

但是當我鍵入python命令,它的運行python26:

rod:~ $python 
Python 2.6.6 (r266:84292, Feb 11 2012, 09:09:16) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> 

我試着卸載我的MacPorts蟒蛇(我曾經有過python31和python25 macports)以及重新安裝,但無濟於事。

我要指出,我最近做了時間機器恢復因硬盤驅動器故障,我一直在尋找一些軟鏈接似乎並沒有正確還原。我想知道這是否會成爲我的問題的來源。有小費嗎?

+0

'$哪個python'? – 2012-02-16 03:47:08

+0

'which python'的結果:/Library/Frameworks/Python.framework/Versions/2.6/bin/python – ralbatross 2012-02-16 03:48:13

+0

嗯,這是你的「系統蟒蛇」的奇怪位置...另外:http:// stackoverflow .COM /問題/ 6152765/MacPorts的-didnt到位,蟒蛇選功能於選擇本地斌 – 2012-02-16 03:49:31

回答

1

請問您的.profile文件仍然有前置到$PATH/opt/local路徑?如果它不存在,儘管被選中,你不會默認它,因爲它符合鏈接版本/opt/local/bin/python

+0

這是它@prodigitalson,謝謝!我的PATH中沒有/ opt/local/bin。 – ralbatross 2012-02-16 04:11:46

相關問題