Home Help Center

"import Ice" fails in Python 2.4

jayjay Member
Hi there,

I've successfully built Ice-3.0.1 on my SuSE 10.1 machine and installed it to the default location in /opt. All Python test scripts are successful. I assign the following environment variable to my .bash_profile.
export ICE_HOME=/opt/Ice-3.0.1

I then build IcePy-3.0.1 without error and install it to the default location in /opt. Afterward, I set the following environment variables:
export ICEPY_HOME=/opt/IcePy-3.0.1
export PYTHONPATH=$ICEPY_HOME/python:$PYTHONPATH

After these variables are set, I attempt to import the 'Ice' module. It gets as far as starting the Ice.py file located in /opt/IcePy-3.0.1/python/Ice.py and attempting to import 'IcePy' on line 15. However, I can't get python to import the .so file. This is the received error:
Python 2.4.1 (#1, Sep 13 2005, 00:39:20)
[GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Ice
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/opt/IcePy-3.0.1/python/Ice.py", line 15, in ?
    import IcePy
ImportError: libIce.so.30: cannot open shared object file: No such file or directory
>>> 

Just to verify, here's the relevant directory listing:
[email protected]:/opt/IcePy-3.0.1/python> ll IcePy*
lrwxrwxrwx  1 root       root       14 2006-05-28 21:59 IcePy.so -> IcePy.so.3.0.1
lrwxrwxrwx  1 root       root       14 2006-05-28 21:52 IcePy.so.30 -> IcePy.so.3.0.1
-rwxr-xr-x  1 jay users 4168286 2006-05-28 21:51 IcePy.so.3.0.1
[email protected]:/opt/IcePy-3.0.1/python> 

I have verified that this isn't a permissions problem. Similarly, when running the IcePy-3.0.1 build tests:
[email protected]:~/src/ice/IcePy-3.0.1> python test/Ice/adapterDeactivation/run.py
starting Server.py...
Traceback (most recent call last):
  File "/home/jay/src/ice/IcePy-3.0.1/test/Ice/adapterDeactivation/run.py", line 25, in ?
    TestUtil.clientServerTest(name)
  File "./config/TestUtil.py", line 289, in clientServerTest
  File "./config/TestUtil.py", line 285, in clientServerTestWithOptions
  File "./config/TestUtil.py", line 262, in clientServerTestWithOptionsAndNames
  File "./config/TestUtil.py", line 143, in getServerPid
ValueError: invalid literal for int(): Traceback (most recent call last):
[email protected]:~/src/ice/IcePy-3.0.1> 

Any help would be greatly appreciated!

Thanks,
Jay

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    It looks like you haven't added /opt/Ice-3.0.1/lib to your LD_LIBRARY_PATH.
  • jayjay Member
    That did the trick, thanks!
Sign In or Register to comment.