2014-12-11 78 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.