Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

Python's easy_install makes installing new packages extremely convenient. However, as far as I can tell, it doesn't implement the other common features of a dependency manager - listing and removing installed packages.

What is the best way of finding out what's installed, and what is the preferred way of removing installed packages? Are there any files that need to be updated if I remove packages manually (e.g. by rm /usr/local/lib/python2.6/dist-packages/my_installed_pkg.egg or similar)?

1 Answer

0 votes
by (106k points)
edited by
  • Pip is an alternative to easy_install, which provides an uninstall command.

  • If your system does not have pip then Install pip using the following commands:-

  • This command is for downloading the pip:-

$ wget https://bootstrap.pypa.io/get-pip.py 

  • After downloading pip run the following command on the terminal of your system to install pip:-

$ python get-pip.py 

  • Then you can use pip uninstall to remove packages which are installed with easy_install in your system.

  • Before using pip uninstall make sure in your system pip is up to date if not then use the following command which will update pip if not updated and if pip is updated it will show you a message that the latest version of pip is up to date.

pip install -U pip  

  • If you are using MacOs then you can use the following command to uninstall the packages without installing pip.

  1. sudo easy_install -m

  2. sudo rm -rf /Library/Python/2.7/site-packages/.egg

If you are looking for upskilling yourself in python you can join our Python Certification and learn from the industrial expert. 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 2, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
asked Oct 17, 2019 in Java by Anvi (10.2k points)
+3 votes
2 answers
0 votes
1 answer

Browse Categories

...