你能告诉我如何卸载我通过克隆Theano Git存储库开发的Theano吗?
我有:
$pip freeze | grep Theano
-e git://github.com/Theano/Theano.git@18319b8f426e99fa209c4910af7208c0d51c41a6#egg=Theano
sudo pip uninstall Theano
返回Can't uninstall 'Theano'. No files were found to uninstall.
sudo pip install Theano
给出:
Requirement already satisfied (use --upgrade to upgrade): theano in ./Theano
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.7.1 in /usr/local/lib/python2.7/dist-packages/numpy-1.12.0.dev0+1436ec3-py2.7-linux-x86_64.egg (from theano)
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.11 in /usr/local/lib/python2.7/dist-packages (from theano)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from theano)
您可能不在安装 Theano 的目录中。
我想,您有以下选择:
$ pip uninstall Theano/
这对我有用(用moto
测试,因为安装 Theano 需要一些编译的包,这些包是在我的机器上失败)。
另一种选择是cd
到Theano dir并从这里取消安装:
$ cd Theano
$ pip uninstall theano
如果这些都不起作用,最后一个选项是通过删除Theano.egg-link 文件。
假设您使用的是名为 testtheano
的 virtualenv ::
$ cd ~/.virtualenvs/testtheano/lib/python2.7/site-packages
$ rm Theano.egg-link
如果它安装了某些脚本,请也删除它们:
$ cd ~/.virtualenvs/testtheano/bin
$ rm <all-the-theano-scripts>
找出它的安装位置:
$ which Theano
并将其删除。
依赖项不应对您造成任何伤害,可以保留在原处。如果要删除它们,可以,但要小心,因为其他软件包很可能需要它们。
你可以简单地从/opt/anaconda/lib/pythonXX/site-packages 中删除 Theano 目录和 egg 文件。