According to the Python documentation, the "profile" module is part of the standard library.
But I can't find it.
On my home machine, I was able to add it using apt-get install. (ie. it's split out into a separate ubuntu package.)
On my work machine, (also ubuntu) I'm running in a virtualenv, so apt-get install isn't relevant. I can install python modules from pypi using easy-install, but I can't see anything on pypi which corresponds to the profiling module. (Presumably because it's meant to be part of the standard python install.)
So how can I install it in this environment?
Whether you're using a virtualenv or not, you should still be able to import the profile module. If you're simply not seeing it in the lib/ directory, don't let that bother you.
But when looking in the virtualenv's lib directory, there's no corresponding module. See below.
Ubuntu's default installation of Python is different from the standard Python download, both for size and licensing reasons. To get the
profile
module back, you need to enable the multiverse repositories (where unsupported and questionable software goes), and install thepython-profiler
package.This has been filed as a bug, for reference.