Python 如何从 ubuntu 中删除 django?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20074883/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to remove django from ubuntu?
提问by
I have installed Django from setup.py from my home directory. I would like to uninstall it. Please tell me a working method.
我已经从我的主目录中的 setup.py 安装了 Django。我想卸载它。请告诉我一个工作方法。
P.S-
PS-
- I have seen most of the answers in Stackoverflow but they did not work. Using ubuntu 12.04.
- One Solution in Stackoverflow for MAC OS X did work for my MAC.
- 我在 Stackoverflow 中看到了大部分答案,但它们没有用。使用 Ubuntu 12.04。
- Stackoverflow for MAC OS X 中的一种解决方案确实适用于我的 MAC。
采纳答案by Guy Gavriely
make sure you install django and other python packages on virtualenvnext time, if you do, it will be as simple as deleting a directory.
确保下次在virtualenv上安装django和其他python包,如果你这样做,就像删除目录一样简单。
回答by falsetru
Install python-pip
sudo apt-get install python-pipRemove django using pip
sudo pip uninstall DjangoUninstall python-pip
sudo apt-get remove python-pip
安装 python-pip
sudo apt-get install python-pip使用 pip 删除 django
sudo pip uninstall Django卸载 python-pip
sudo apt-get remove python-pip
回答by Stone
Open the python shell
>> import django
>> django.__path__
Copy the path. then press Ctrl +D
复制路径。然后按Ctrl + D
Execute following Command on the shell:
在 shell 上执行以下命令:
sudo rm -r path
or from terminal:
或从终端:
pip uninstall Django

