¿Cómo instalar y configurar IPython para que use Python3.2 en 11.10?

14

¿Cómo instalar y configurar IPython para que use Python3.2 en 11.10? Lo he comprobado instalando

sudo apt-get install ipython

utilizará python2.7.

[EDITAR1]

$ 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
$
qazwsx
fuente
quieres decir 11.10
wim
Si. Corregido en el título.
qazwsx
pero no en el cuerpo ..: P
wim
Ya está arreglado.
qazwsx

Respuestas:

11

Puede usar pip3para instalar ipython.

sudo apt-get install python3-pip
sudo pip3 install ipython
suzanshakya
fuente
2
pip3no me da una ipython3orden Me puse python3 /usr/local/lib/python3.3/site-packages/IPython/__main__.pyen /usr/local/bin/ipython3mí mismo para manejar eso.
kqw
¿Cómo instalar pip3?
qazwsx
Eso rinde E: Unable to locate package pip3.
qazwsx
El comando correcto essudo apt-get install python3-pip
Bar
Para mí, parece que estos comandos establecen por ipythondefecto a Python 3, mientras que anteriormente era Python 2. Solo algo a tener en cuenta.
Kurt Peek
2

Julian Taylor tiene PPA para IPython:

IPython estable (ppa: jtaylor / ipython)

Nightlies de IPython (ppa: jtaylor / ipython-dev)

Para oneiric, la instalación ipython3desde cualquiera de estos le proporciona el terminal estándar IPython. La consola Qt y el cuaderno HTML funcionan en Python 3, pero deberá instalar algunas dependencias. Hay instrucciones en el wiki de IPython .

Thomas K
fuente
Siguiendo las instrucciones aquí , obtengo $ python3 configure.py python3: can't open file 'configure.py': [Errno 2] No such file or directory¿Dónde es esto configure.py?
qazwsx 01 de
@ user6076: cuando lo haga apt-get source python-qt4, creará un directorio python-qt4 -..., en el que debe cdingresar. He actualizado la wiki para aclarar esto.
Thomas K
Todavía no funciona debido a que sipno se encuentra, ver en la publicación original.
qazwsx
@ user6076: ¿Has instalado python3-sip-dev? Es posible que también lo necesites python-sip-dev, no lo he intentado sin él.
Thomas K