Seems the default installation of IcePy under gentoo has problems importing the Ice module: Digging deeper, the problem is it can't locate /usr/lib/libIce.so as /usr/lib is not in the default search path. Adding /usr/lib fixes things: but an easier way to effect this is with a Ice.pth file at the same location as the Ice.py module top level: Any chance of getting this in future ebuilds? Reproducible: Always Steps to Reproduce: problem % python -c 'import Ice; print "success"' Traceback (most recent call last): File "<string>", line 1, in ? File "/usr/lib64/python2.4/site-packages/Ice.py", line 30, in ? import IcePy ImportError: No module named IcePy % Actual Results: % python -c 'import Ice; print "success"' success % Expected Results: workaround % PYTHONPATH='/usr/lib:$PYTHONPATH' !! PYTHONPATH='/usr/lib:$PYTHONPATH' python -c 'import Ice; print "success"' success % better fix % echo '/usr/lib' >> /usr/lib/python2.4/site-packages/Ice.pth % python -c 'import Ice; print "success"' success % The Ice.pth file is used by Python to implicitly add an entry to the search path. Seems like a good way to have the Ice.py component be able to find the libIce.so
I also experienced this bug. I would disagree with adding /usr/lib to the python path though since it's a really big directory, and most files in that directory should not be considered for import (except IcePy). I have used a different approach in #185972 (a new ebuild for IcePy-3.2.0). It creates a symbolic link from /usr/lib/IcePy.so -> /usr/lib/python-2.x/site-packages/.
fixed now from 185972