无法在Ubuntu 11.4中启动许多Python程序

无法在Ubuntu 11.4中启动许多Python程序,python,ipython,Python,Ipython,我最近开始使用Ubuntu。我是一名经验丰富的程序员,多年来一直在使用“旧”Python。但是,在Python3.2中,当我尝试运行我从中安装的几个不同程序中的一个时,例如,我得到一条类似于下面粘贴的错误消息 在这里,我试着开始IPython。但错误也发生在其他人身上 Traceback (most recent call last): File "./ipython3", line 9, in <module> load_entry_point('ipython==0.12',

我最近开始使用Ubuntu。我是一名经验丰富的程序员,多年来一直在使用“旧”Python。但是,在Python3.2中,当我尝试运行我从中安装的几个不同程序中的一个时,例如,我得到一条类似于下面粘贴的错误消息

在这里,我试着开始IPython。但错误也发生在其他人身上

Traceback (most recent call last):

File "./ipython3", line 9, in <module>

load_entry_point('ipython==0.12', 'console_scripts', 'ipython3')()

File "/usr/local/lib/python3.2/dist-packages/distribute-0.6.24-py3.2.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)

File "/usr/local/lib/python3.2/dist-packages/distribute-0.6.24-y3.2.egg/pkg_resources.py", line 2279, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))

ImportError: Entry point ('console_scripts', 'ipython3') not found
回溯(最近一次呼叫最后一次):
文件“/ipython3”,第9行,在
加载入口点('ipython==0.12','console脚本','ipython3')()
文件“/usr/local/lib/python3.2/dist-packages/distribute-0.6.24-py3.2.egg/pkg_resources.py”,第337行,在加载入口点
返回获取分布(dist)。加载入口点(组、名称)
文件“/usr/local/lib/python3.2/dist-packages/distribute-0.6.24-y3.2.egg/pkg_resources.py”,第2279行,在加载入口点
“未找到入口点%r”((组、名称),))
ImportError:未找到入口点('console_scripts','ipython3')

我在谷歌上搜索了这个错误,发现其他用户也有类似的问题,但据我所知,还没有人报告真正的解决方案

我猜您将发行版安装与easy_安装混合在一起

使用Python进行实验和工作的最佳方法可能是使用一个单独的“沙箱”。使用virtualenv(这是几种方法之一),可以按如下方式进行:

$ virtualenv -p /usr/bin/python3.2 --distribute MYPYTHON32
Running virtualenv with interpreter /usr/bin/python3.2
New python executable in MYPYTHON32/bin/python3.2
Also creating executable in MYPYTHON32/bin/python
Installing distribute...
然后,您可以安装任何您想玩的东西:

$ cd MYPYTHON32
$ bin/easy_install ipython
我没有问题:

$ bin/ipython3
Python 3.2 (r32:88445, Dec  8 2011, 15:26:58) 
Type "copyright", "credits" or "license" for more information.

IPython 0.12 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]:

在virtualenv上会给你更多提示。这种可能的安装方式不会干扰系统python,并且您始终可以控制在沙箱中安装的内容。

我在这里可能大错特错,但据我所知,ipython更适合在.NET平台上使用python。因此,我不知道这在Linux上是否可用。看看你能不能用它python@inspectorG4dget“你是不是在想呢?”Makato:是的。我看到了ipython,想到了IronPython。@Inspector4dget ipython可能是“交互式Python”,是一个可选的Python解释器。@mlefavor:它不是严格意义上的解释器;IPython是Python解释器的交互式shell。但你是对的,“互动”是个好主意。