15

How to use the newest ipython in ubuntu12.04?

The newest ipython is 1.0. The ipython in official software center is too old.

Thanks

2 Answers 2

21

You can use setuptools or pip. These usually get the latest version of any python package listed on PyPi

Try

sudo apt-get install python-pip          # or python-setuptools
sudo pip install ipython
6
  • 5
    +1. Using pip is indeed the way to install Python packages from PyPI. Also consider installing it in the user's home directory rather than system wide (less harmful in general - although ipython isn't likely to break things) by using pip install --upgrade --user packagename. It will then install it to ~/.local/bin which is in the PYTHONPATH on Ubuntu.
    – gertvdijk
    Aug 22, 2013 at 15:43
  • 1
    I second the --user flag when using pip. Especially for packages that interact directly with the operating system and its libraries eg. PIL. This avoids breaking anything which depends on certain versions on libraries by not installing it system-wide. Aug 22, 2013 at 15:49
  • pip install --upgrade --user ipython will remove old ipython in system. Is it safe ? Aug 23, 2013 at 3:38
  • 1
    @waterloo2005 No, it won't remove any ipython from the system, nor will the regular sudo pip install packagename do. DPKG/APT installs in a different location, that had precedence over it. That makes running ipython or import packagename look first in the locations where pip installs. If you remove the pip package again, e.g. sudo pip uninstall packagename (or the user-equivalent), then you'll be using the older Ubuntu packaged version again. So, yes, it is totally safe. Yet, I recommend using --user without sudo if you only use it for that user account.
    – gertvdijk
    Aug 23, 2013 at 8:43
  • I will create a more canonical Q&A on Python packages installation using DPKG/APT together with the pip method in a few days if I can't find one.
    – gertvdijk
    Aug 23, 2013 at 8:45
18
sudo pip install --upgrade ipython 
1
  • Good answer, not sure why downvoted Nov 12, 2013 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.