Uninstalled IPython on Ubuntu but can still be used
really works use "sudo pip uninstall ipython"
Blue Otter Hat
Updated on June 04, 2022Comments
-
Blue Otter Hat almost 2 years
I tried to install rpy2 earlier today, to use IPython Notebooks in conjunction with R. I'm using Ubuntu 12.04. However, I had issues with using the magics extension, so went off down a rathole to resolve...
I've tried to uninstall IPython via the command
sudo apt-get remove --auto-remove ipython
... which seemed to work correctly, and from looking in
/usr/lib/python2.7/dist-packages
, I manually can't see an IPython directory. I double checked the uninstallation method worked:me@my_laptop:/usr/lib/python2.7/dist-packages$ sudo apt-get remove -auto-remove ipython Reading package lists... Done Building dependency tree Reading state information... Done Package ipython is not installed, so not removed 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
However, I can go into a terminal and type
ipython
I get the following -- note that I can import the package as well:me@my_laptop:/usr/lib/python2.7/dist-packages$ pwd /usr/lib/python2.7/dist-packages me@my_laptop:/usr/lib/python2.7/dist-packages$ ipython Python 2.7.3 (default, Dec 18 2014, 19:10:20) Type "copyright", "credits" or "license" for more information. IPython 3.0.0-b1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import IPython In [2]: IPython Out[2]: <module 'IPython' from '/usr/local/lib/python2.7/dist-packages/IPython/__init__.pyc'>
NB I tried to use the comment by kermit666 in, butthis did not seem to help: Broken IPython notebook install Ubuntu 13.10 how to force reinstall
Does Python cache its packages somehow, like in a database, that I need to update somehow? I don't understand how it is loading something that in theory has been deleted?
-
Maximillian Laumeister about 8 yearsThanks for posting an answer to this question! This answer is very short though and doesn't provide much context. Please explain some of the reasoning behind it, and it will become much more useful for the asker and future readers. Thanks!
-
Wodin over 3 yearsNote: You do not need the
-r
and you most likely do not need the-f
. Usingrm -rf
whenrm
will do is a bad habit :) I have seen it get people into trouble when they accidentally had a space inrm -rf /var/mail/ username
which deleted the mailboxes of several users instead of just the intended one.