需要卸载ipython for python 2.6.1吗?
我用easy_install给Python 2.6.1安装了ipython。后来发现我需要2.7版本才能使用matplotlib,所以我下载并用sudo安装了ipython和Python 2.7的资源。我需要把“旧的”ipython卸载掉吗?如果需要,我该怎么做?
1 个回答
2
不,你不需要这样做。ipython这个包的数据是存放在你安装它的那个Python版本的site-packages目录里的。ipython的可执行文件基本上包含了
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
long comment about IPython.Shell that you
might want to read; omitted here for brevity
"""
import IPython.Shell
IPython.Shell.start().mainloop()
它会使用默认的Python版本来运行。如果你的默认Python版本是2.6,你可以直接用下面的命令来调用2.7版本:/path/to/python2.7 /path/to/ipython