2

I installed ipython using python-pip. Here is the traceback :

user@MY-PC:~$ sudo pip install ipython
[sudo] password for user: 
Downloading/unpacking ipython
  Downloading ipython-2.3.0-py27-none-any.whl (2.8MB): 2.8MB downloaded
Installing collected packages: ipython
Successfully installed ipython
Cleaning up...

However when I ran the dpkg -s and dpkg -l commands to check the version the terminal gave the following outputs :

user@MY-PC:~$ dpkg -s ipython | grep Version
dpkg-query: package 'ipython' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

user@MY-PC:~$ dpkg -l ipython
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  ipython        <none>       <none>       (no description available)

What is wrong here and how do I verify my installation of ipython and check its version?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Vineet Kaushik
  • 2,204
  • 7
  • 27
  • 36

2 Answers2

3

Try sudo apt-get install ipython. I think the pip command is for python itself (installing module, etc.) and not for installing a system program, just speculation,not sure of it.

Maybe try

python ipython

Or python then import ipython or ipython

Lucio
  • 18,843
Rohan
  • 78
  • 7
0

You have installed it as source package, the goal is to use it as a library on your code.

In order to check it, enter python in a terminal to open a shell and try to import it:

import ipython

If you get none errors, it means everything is alright. An example:

>>> import os # This package exist and it's installed!
>>> os
<module 'os' from '/usr/lib/python2.7/os.pyc'>
>>> import bottle # This package exist but it's not installed!
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named bottle
>>> bottle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'bottle' is not defined

It happens to be that your specified package provides interactive Python shells terminal based (read documentation) so you can use it from your terminal running ipython as any other command.

This is a very specific case and does not apply to every python package.

More information on apt-get install vs pip install

Lucio
  • 18,843