I installed guppy the memory profiler from its svn#95 via "sudo python setup.py install".
It looks properly installed.
yey@yey:/usr/local/lib/python2.7/dist-packages/guppy/heapy$ ls *.so *.py
AbstractAlgebra.py ImpSet.py Path.py Remote.py Use.py
Classifiers.py __init__.py pbhelp.py RM.py View.py
Console.py Monitor.py Prof.py Spec.py
Doc.py OutputHandling.py RefPat.py Target.py
heapyc.so Part.py RemoteConstants.py UniSet.py
But I still can't import it. Guppy's Python source does this import so it should succeed.
>>> import guppy.heapy
>>> import guppy.heapy.heapyc
# trying /usr/local/lib/python2.7/dist-packages/guppy/heapy/heapyc.so
# trying /usr/local/lib/python2.7/dist-packages/guppy/heapy/heapycmodule.so
# trying /usr/local/lib/python2.7/dist-packages/guppy/heapy/heapyc.py
# trying /usr/local/lib/python2.7/dist-packages/guppy/heapy/heapyc.pyc
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named heapyc
My question is, Python clearly made an attempt to import the file at the correct location. Why did it fail? Is it because the .so file corrupted? Or is it my ld.so.cache bad somehow? Thanks!