我在Ubuntu上,我需要卸载matplotlib
,我把它作为Ubuntu包安装,然后用pip
进行升级。
通常的命令不起作用:
$ sudo pip uninstall matplotlib
Can't uninstall 'matplotlib'. No files were found to uninstall.
我该怎么办?
额外信息:
~$ pip matplotlib --version
ERROR: unknown command "matplotlib"
me@me:~$ pip show matplotlib
---
Name: matplotlib
Version: 1.4.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: numpy, six, python-dateutil, pyparsing, nose, mock, nose, mock
$ pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
使用pip,您已经将matplotlib安装为用户而不是根用户。这意味着当你试图卸载它作为根时,它不会被识别为已安装(因为它没有)。
你需要用用户级权限卸载它,这样就可以删除“sudo”
因此,pip命令应该如下所示:
而不是:
相关问题 更多 >
编程相关推荐