Home > Article > Backend Development > Summary of methods for uninstalling modules in Python
This article summarizes and introduces 3 methods for uninstalling Python installed modules. It is recommended that you use easy_install or pip to do it. It is simple and convenient
easy_install uninstall
Modules installed through easy_install can be uninstalled directly through easy_install -m PackageName, and then delete the egg in the \Python27\Lib\site-packages directory.
setup.py Uninstall
For modules installed through the setup.py included with the distribution package, the uninstall option provided by setup.py is preferred. If the author does not provide the uninstall option, uninstall manually through the following command line:
First obtain the files generated during the installation process:
python setup.py install --record record.txt
Then Get rid of them:
FOR /F "delims=" %f in (record.txt) DO del "%f"
After that, you can go to \Python27\Lib\site-packages to check whether there are any empty directories left.
Use pip
Install pip
$ wget https://bootstrap.pypa.io/get-pip.py $ python get-pip.py
Delete the specified module or package
pip uninstall xxx
I think it is better to use easy_install to install it, so that it is more convenient to uninstall it.
The above is the detailed content of Summary of methods for uninstalling modules in Python. For more information, please follow other related articles on the PHP Chinese website!