Home > Backend Development > Python Tutorial > Summary of methods for uninstalling modules in Python

Summary of methods for uninstalling modules in Python

不言
Release: 2018-04-24 15:02:39
Original
1725 people have browsed it

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
Copy after login

Then Get rid of them:

FOR /F "delims=" %f in (record.txt) DO del "%f"
Copy after login

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
Copy after login

Delete the specified module or package

pip uninstall xxx
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template