如何安装和配置IPython,使其在11.10上使用Python3.2?


14

如何安装和配置IPython,使其在11.10上使用Python3.2?我已经通过安装检查了

sudo apt-get install ipython

将使用python2.7

[EDIT1]

$ sudo python3 configure.py
Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.8.5 (licensed under the GNU General Public
License) for Python 3.2.2 on linux2.

Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Found the license file pyqt-gpl.sip.
Checking to see if the QtGui module should be built...
Checking to see if the QtHelp module should be built...
Checking to see if the QtMultimedia module should be built...
Checking to see if the QtNetwork module should be built...
Checking to see if the QtDeclarative module should be built...
Checking to see if the QtOpenGL module should be built...
Checking to see if the QtScript module should be built...
Checking to see if the QtScriptTools module should be built...
Checking to see if the QtSql module should be built...
Checking to see if the QtSvg module should be built...
Checking to see if the QtTest module should be built...
Checking to see if the QtWebKit module should be built...
Checking to see if the QtXml module should be built...
Checking to see if the QtXmlPatterns module should be built...
Checking to see if the phonon module should be built...
Checking to see if the QtAssistant module should be built...
Checking to see if the QtDesigner module should be built...
Checking to see if the dbus support module should be built...
DBus v1 does not seem to be installed.
Qt v4.7.4 free edition is being used.
SIP 4.12.4 is being used.
The Qt header files are in /usr/include/qt4.
The shared Qt libraries are in /usr/lib/i386-linux-gnu.
The Qt binaries are in /usr/bin.
The Qt mkspecs directory is in /usr/share/qt4.
These PyQt modules will be built: QtCore, QtHelp, QtNetwork, QtDeclarative,
QtScript, QtScriptTools, QtSvg, QtTest, QtWebKit, QtXml, QtXmlPatterns,
QtDesigner.
The PyQt Python package will be installed in /usr/lib/python3/dist-packages.
PyQt is being built with generated docstrings.
PyQt is being built with 'protected' redefined as 'public'.
The Designer plugin will be installed in
/usr/lib/i386-linux-gnu/qt4/plugins/designer.
The PyQt .sip files will be installed in /usr/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in /usr/bin.
Generating the C++ source for the QtCore module...
sh: /usr/bin/sip: not found
Error: Unable to create the C++ code.
$ which sip
$ sudo apt-get install sip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sip
$

您是说11.10
凌晨

是。标题更正。
qazwsx 2012年

但不在体内..:P
wim 2012年

现在已修复。
qazwsx 2012年

Answers:


11

您可以pip3用来安装ipython。

sudo apt-get install python3-pip
sudo pip3 install ipython

2
pip3没有给我ipython3命令。我把python3 /usr/local/lib/python3.3/site-packages/IPython/__main__.py/usr/local/bin/ipython3自己搞定。
kqw

如何安装pip3?
qazwsx

那产生了E: Unable to locate package pip3
qazwsx

正确的命令是sudo apt-get install python3-pip
Bar

对我来说,这些命令似乎ipython默认使用Python 3,而以前是Python 2。只是要注意的事情。
库尔特·皮克


2

朱利安·泰勒(Julian Taylor)为IPython提供了PPA:

IPython稳定版(ppa:jtaylor / ipython)

IPython夜间活动(ppa:jtaylor / ipython-dev)

对于oneiric,ipython3从这两个安装程序中的任何一个均可获得标准的终端IPython。Qt控制台和HTML笔记本都可以在Python 3中使用,但是您需要安装一些依赖项。在IPython Wiki上说明


按照此处的指示进行操作,我知道$ python3 configure.py python3: can't open file 'configure.py': [Errno 2] No such file or directory这是哪里configure.py
qazwsx 2012年

@ user6076:执行此操作时apt-get source python-qt4,它将创建一个目录python-qt4 -...,您需要cd进入该目录。我已经更新了维基,以澄清这一点。
Thomas K

由于sip找不到而仍无法正常工作,请参阅原始帖子。
qazwsx 2012年

@ user6076:您安装了python3-sip-dev吗?您可能也需要它python-sip-dev,我没有尝试过。
Thomas K
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.