Python Profiler on Ubuntu Missing or import hotshots.stats fail

Turns out Ubuntu is missing pythons standard library component profile.py due to licensing issues related to debian.

I don’t really care about that.

What I care about is the solution.

Enable the multiverse repository in your ubuntu.

vim /etc/apt/sources.list

Copy and paste one of the lines (they are version specific) and replace the ending text with “multiverse”. It doesn’t really do any damage to keep other repo names on there.

## Added mutliverse for python-profiler
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse

Update repo list and install python-profiler.

apt-get update
apt-get install python-profiler

Done.

Leave a Reply

Fill in your details below or click an icon to log in:

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