【发布时间】:2015-02-08 20:02:29
【问题描述】:
我今天早些时候尝试安装 rpy2,将 IPython Notebooks 与 R 结合使用。我使用的是 Ubuntu 12.04。但是,我在使用魔法扩展时遇到了问题,所以我去老鼠洞解决了……
我尝试通过命令卸载 IPython
sudo 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'>
注意我尝试使用 kermit666 的评论,但这似乎没有帮助:Broken IPython notebook install Ubuntu 13.10 how to force reinstall
Python 是否以某种方式缓存它的包,比如在数据库中,我需要 以某种方式更新?我不明白它是如何加载理论上已被删除的东西的?
【问题讨论】:
-
你也是用pip安装的吗?
-
是的,pip 也试过了
-
我的意思是你可能需要
pip uninstall ipythonapt-get 不会删除安装的 pip。那也是你安装的 ipython 的稳定版本吗? -
是的,我尝试过使用
pip uninstall,但没有成功。据我所知,它是 IPython 的标准版本——你知道检查的方法吗? -
请注意
/usr/lib(来自 apt-get 的系统安装包将放置文件)和/usr/local/lib之间的区别,您使用 pip 或 setup.py(加上 sudo)安装的东西将去吧。
标签: python ubuntu dependencies ipython