2014-12-11 75 views
0

我想在運行Yosemite的Mac上安裝ipdb。當我鍵入:使用Macports安裝ipdb時出錯

sudo port install ipdb. 

它給我這個錯誤:

Error: Port ipdb not found 

如何解決這個問題?

+0

有你使用MacPorts的理由嗎?大多數人都轉移到自制軟件http://brew.sh/ – nathancahill 2014-12-11 04:47:04

+1

另外,你應該可以使用pip安裝ipdb:'pip install ipdb' – nathancahill 2014-12-11 04:48:16

+0

已經在使用macports了。我所有的軟件包都是通過macports下載的。這就是爲什麼。 – lakesh 2014-12-11 04:51:17

回答

1

如果您在MacPorts available ports list中搜索ipdb,您會發現其中有幾個,每個支持MacPorts的Python版本都有一個。請注意,MacPorts項目不推薦使用舊版本的Python,因此您應該選擇Python 2.7或3.4版本。例如:

sudo port install py34-ipdb 

您也可以使用命令行界面來搜索:

$ port search ipdb 
ipdb_select @0.3_1 (python) 
    common files for selecting default ipdb version 

py-ipdb @0.8 (python) 
    An enhanced Interactive Python shell 

py24-ipdb @0.8_1 (python) 
    this port is only a stub and has been made obsolete by py27-ipdb 

py25-ipdb @0.8_1 (python) 
    this port is only a stub and has been made obsolete by py27-ipdb 

py26-ipdb @0.8_1 (python) 
    this port is only a stub and has been made obsolete by py27-ipdb 

py27-ipdb @0.8 (python) 
    An enhanced Interactive Python shell 

py31-ipdb @0.8_1 (python) 
    this port is only a stub and has been made obsolete by py34-ipdb 

py32-ipdb @0.8_1 (python) 
    this port is only a stub and has been made obsolete by py34-ipdb 

py33-ipdb @0.8_1 (python) 
    this port is only a stub and has been made obsolete by py34-ipdb 

py34-ipdb @0.8 (python) 
    An enhanced Interactive Python shell 

Found 10 ports.