Mac OS & Python: Add and remove Python modules

Mac OS has Python built-in, and also has the cool command ‘easy_install’ already part of the system. This command lets us easily grab and install Python modules and their dependencies. However, this tool does not allow us to uninstall them. For that we’ll need to get another command – one that we can get using the easy_install command.

First we’re going to install pip on our system, a command that will help us cleanly uninstall Python code when we need to. Open up your terminal and type:

pip (Pip Installs Packages)

sudo easy_install pip

You’ll be asked for your password, and pip will be installed. Great! Now let’s test it by installing and uninstalling the Twitter API for Python.

Installs Twitter API:

sudo easy_install twitter

Uninstalls Twitter API:

sudo pip twitter

It’s super effective!

Leave a Reply

Your email address will not be published. Required fields are marked *