Uninstall all Python packages installed by me and

2019-09-14 00:41发布

问题:

There are a ton of questions, but the correct way seem to manually uninstall everything that you don't need. pip doesn't uninstall the dependencies of a package on uninstall and the pip-autoremove is reported to be broken. Here is my pip freeze:

altgraph==0.10.2
backports-abc==0.5
bdist-mpkg==0.5.0
bonjour-py==0.3
certifi==2016.9.26
dask==0.12.0
macholib==1.5.1
matplotlib==1.3.1
modulegraph==0.10.4
nose==1.3.7
numpy==1.8.0rc1
Pillow==3.4.2
py2app==0.7.3
pyobjc-core==2.5.1
pyobjc-framework-Accounts==2.5.1
pyobjc-framework-AddressBook==2.5.1
pyobjc-framework-AppleScriptKit==2.5.1
pyobjc-framework-AppleScriptObjC==2.5.1
pyobjc-framework-Automator==2.5.1
pyobjc-framework-CFNetwork==2.5.1
pyobjc-framework-Cocoa==2.5.1
pyobjc-framework-Collaboration==2.5.1
pyobjc-framework-CoreData==2.5.1
pyobjc-framework-CoreLocation==2.5.1
pyobjc-framework-CoreText==2.5.1
pyobjc-framework-DictionaryServices==2.5.1
pyobjc-framework-EventKit==2.5.1
pyobjc-framework-ExceptionHandling==2.5.1
pyobjc-framework-FSEvents==2.5.1
pyobjc-framework-InputMethodKit==2.5.1
pyobjc-framework-InstallerPlugins==2.5.1
pyobjc-framework-InstantMessage==2.5.1
pyobjc-framework-LatentSemanticMapping==2.5.1
pyobjc-framework-LaunchServices==2.5.1
pyobjc-framework-Message==2.5.1
pyobjc-framework-OpenDirectory==2.5.1
pyobjc-framework-PreferencePanes==2.5.1
pyobjc-framework-PubSub==2.5.1
pyobjc-framework-QTKit==2.5.1
pyobjc-framework-Quartz==2.5.1
pyobjc-framework-ScreenSaver==2.5.1
pyobjc-framework-ScriptingBridge==2.5.1
pyobjc-framework-SearchKit==2.5.1
pyobjc-framework-ServiceManagement==2.5.1
pyobjc-framework-Social==2.5.1
pyobjc-framework-SyncServices==2.5.1
pyobjc-framework-SystemConfiguration==2.5.1
pyobjc-framework-WebKit==2.5.1
pyOpenSSL==0.13.1
pyparsing==2.0.1
python-dateutil==1.5
pytz==2013.7
scipy==0.18.1
singledispatch==3.4.0.3
six==1.4.1
toolz==0.8.1
tornado==4.4.2
xattr==0.6.4
zope.interface==4.1.1

How to know which pakcages are installed by me? Is there a date entry maybe? Because I got heated with Python only the last week. I do not want to uninstall anything that will force me to reinsall Mac OS.

回答1:

So if you need to find what are the dependencies of a package, just run pip show PACKAGE | grep 'Requires'. Still, you have to know which package YOU installed, and you have to be careful because dependencies could be shared with other "system" packages.