[Tutor] strange hotshot error

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Tue Mar 15 22:53:32 CET 2005


hi Danny, I had no idea Debian split its profiler into a separate package
in the testing distro.  That would explain it, except I am using Debian
unstable with Debian stable for security packages, as my
"more /etc/apt/sources.list" output is:

nike:# more /etc/apt/sources.list
#deb file:///cdrom/ sarge main

deb http://ftp.us.debian.org/debian/ unstable main
deb-src http://ftp.us.debian.org/debian/ unstable main

deb http://security.debian.org/ stable/updates main

The following is the output from the steps you suggested:

>>> print "version is", sys.version
version is 2.3.5 (#2, Feb  9 2005, 00:38:15)
[GCC 3.3.5 (Debian 1:3.3.5-8)]
>>> print "python lib is",
python lib is
>>> print distutils.sysconfig.get_python_lib(standard_lib=True)
/usr/lib/python2.3
>>> print "System path is:", sys.path
System path is: ['/home/tpc', '/usr/bin', '/usr/lib/python23.zip',
'/usr/lib/python2.3', '/usr/lib/python2.3/plat-linux2',
'/usr/lib/python2.3/lib-tk', '/usr/lib/python2.3/lib-dynload',
'/usr/local/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages/Numeric',
'/usr/lib/python2.3/site-packages/gtk-2.0']

On Tue, 15 Mar 2005, Danny Yoo wrote:

> > This is highly unusual!  This should have worked without any error
> > messages, as both the 'profile' and 'hotshot' modules are part of the
> > Standard Library, and should work out of the box.
>
> Hi Tpc,
>
>
> Oh, wait.  The above statement is usually true, unless we're running
> something from a Linux distribution like Debian testing.  Let me make that
> assumption for the moment, until I see your 'sys.version' string.
>
> Debian, which does its own packaging of Python, often tears apart the
> Standard Library into individual packages due to licensing issues.  In
> particular, Debian separates the profiling stuff into a separate Debian
> package called 'python-profiler':
>
>     http://packages.debian.org/testing/python/python-profiler
>
> If you are running Debian's testing distribution, you will need to do an
> 'apt-get python-profiler' first.
>
>
> Of course, this is only a wild guess that depends on the core assumption
> that you are running Debian Testing.  So, if you aren't, ignore everything
> I said.  *grin*
>
>
> Hope this helps!
>
>



More information about the Tutor mailing list