Home > python, ubuntu > List all installed python packages

List all installed python packages

(pip freeze | cut -d = -f 1 | grep -v FIXME | xargs echo | tr ' ' '\n' >list.txt) 2>/dev/null

The list is written to “list.txt”, one package per line. This tip is based upon this thread. This version removes FIXME lines and warnings.

I want to figure out how to upgrade all those packages that I installed via “pip install”. The thread above proposes to execute “pip install -U” on the list of packages. However, it will upgrade every python package, even the ones that were installed with apt-get (or Synaptic, etc.). Apt-get builds a database that contains every file on the system. If “pip install -U” replaces those files, I’m afraid apt-get will panic. This is something to be investigated.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 97 other followers

%d bloggers like this: