How to install and configure IPython so it uses Python3.2 on 11.10?

15,880

Solution 1

You can use pip3 to install ipython.

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

Solution 2

You need to install python-sip-dev Install python-sip-dev or /usr/bin/sip will not exist.

Solution 3

Julian Taylor has PPAs for IPython:

IPython stable (ppa:jtaylor/ipython)

IPython nightlies (ppa:jtaylor/ipython-dev)

For oneiric, installing ipython3 from either of those gets you the standard terminal IPython. The Qt console and the HTML notebook both work in Python 3, but you'll need to install some dependencies. There are instructions on the IPython wiki.

Share:
15,880

Related videos on Youtube

qazwsx
Author by

qazwsx

Updated on September 18, 2022

Comments

  • qazwsx
    qazwsx almost 2 years

    How to install and configure IPython so it uses Python3.2 on 11.10? I've checked that by installing

    sudo apt-get install ipython
    

    will use 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
    $
    
    • wim
      wim over 12 years
      do you mean 11.10
    • qazwsx
      qazwsx over 12 years
      Yes. Corrected in title.
    • wim
      wim over 12 years
      but not in body.. :P
    • qazwsx
      qazwsx over 12 years
      It is fixed now.
  • Thomas K
    Thomas K over 12 years
    @user6076: When you do apt-get source python-qt4, it will create a directory python-qt4-..., which you need to cd into. I've updated the wiki to clarify this.
  • qazwsx
    qazwsx over 12 years
    Still not working because of sip not found, see in the original post.
  • the
    the over 9 years
    pip3 doesn't give me a ipython3 command. I put python3 /usr/local/lib/python3.3/site-packages/IPython/__main__.py in /usr/local/bin/ipython3 myself to handle that.
  • qazwsx
    qazwsx about 9 years
    How to install pip3?
  • qazwsx
    qazwsx almost 9 years
    That yields E: Unable to locate package pip3.
  • Kurt Peek
    Kurt Peek over 7 years
    For me, it appears that these commands make ipython default to Python 3, whereas it was Python 2 previously. Just something to be aware of.