我今天早些时候尝试安装rpy2,将IPython笔记本与R结合使用。我正在使用Ubuntu 12.04。但是,我在使用魔法扩展时遇到了问题,因此我决定使用魔法扩展......
我试图通过命令
卸载IPythonsudo apt-get remove --auto-remove ipython
...似乎工作正常,从查看/usr/lib/python2.7/dist-packages
,我手动无法看到IPython目录。我仔细检查了卸载方法:
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.
但是,我可以进入终端并键入ipython
我得到以下内容 - 请注意我也可以导入该包:
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我尝试使用kermit666中的评论,但这似乎没有帮助:Broken IPython notebook install Ubuntu 13.10 how to force reinstall
Python是否需要以某种方式缓存其包,就像在数据库中一样 以某种方式更新?我不明白它是如何装载理论上被删除的东西的?
答案 0 :(得分:1)
真的有用“sudo pip uninstall ipython”
答案 1 :(得分:0)
您只需检查它所在的包裹
$ which ipython
可能是你获取路径/usr/local/bin/
然后输入命令。
$ sudo rm -rf /usr/local/bin/ipython
它可能是有效的。它为我工作。
答案 2 :(得分:-1)
这应该有效:
> pip uninstall ipython