

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to delete an installed module in Python?
You can uninstall most installed Python packages using pip. For more info on pip uninstall, head over to: https://pip.pypa.io/en/stable/reference/pip_uninstall/. For example, if you have numpy package installed and want to uninstall it, then enter the following:
$ pip uninstall numpy
However there are some exceptions. These packages cant be removed easily using pip:
1. Pure distutils packages installed with python setup.py install, which leave behind no metadata to determine what files were installed.
2. Script wrappers installed by python setup.py develop.
You need to remove all files manually, and also undo any other stuff that installation did manually.
If you don't know the list of all files, you can reinstall it with the --record option, and take a look at the list this produces. To record list of installed files, you can use:
$ python setup.py install --record files.txt
Now you'll have a list of all files in the files.txt, which you can then manually remove.
- Related Questions & Answers
- How to connect to an SAP module?
- How to develop a Python Module?
- How to install a Python Module?
- How to write a python module?
- How to retrieve Python module path?
- Reading an image using Python OpenCv module
- Python - Writing to an excel file using openpyxl module
- How do I know if Python has pandas installed?
- How to locate a particular module in Python?
- How to use the Subprocess Module in Python?
- How can I delete an element in Selenium using Python?
- Fraction module in Python
- Import module in Python
- Keyboard module in Python
- colorsys module in Python