windows 如何重置站点包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7387453/
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 reset site-packages
提问by Jonathan
Is there a way to "reset" C:\Python26\Lib\site-packages
? i.e. to remove all packages and modules installed either by setup.py install
or using easy_install
?
有没有办法“重置” C:\Python26\Lib\site-packages
?即删除通过setup.py install
或使用安装的所有软件包和模块easy_install
?
Motivation: something went wrong with all the package versions and dependencies and I rather reset and reinstall everything than spend the time in figuring out what it was exactly...
动机:所有软件包版本和依赖项都出现问题,我宁愿重置并重新安装所有内容,也不愿花时间弄清楚它到底是什么......
采纳答案by ed.
You could just delete all the contents in the folder, although there may still be files in Tools/Scripts and other places left over.
您可以删除文件夹中的所有内容,尽管工具/脚本和其他地方可能仍有文件遗留。
Have a look here:StackOverflow: uninstall a python package
回答by Lewis Ellis
Take a look at virtualenvfor future reference.
查看virtualenv以供将来参考。
回答by Bryan Oakley
Does a simple rm -rf *
in the site-packages directory do what you want, or do you want to leave some packages untouched?
rm -rf *
site-packages 目录中的一个 simple是做你想做的,还是你想保留一些包不受影响?