Results 1 to 3 of 3

Thread: "import Ice" fails in Python 2.4

  1. #1
    jay
    jay is offline Registered User
    Join Date
    May 2006
    Location
    RI, USA
    Posts
    2

    "import Ice" fails in Python 2.4

    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.

    Code:
    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:

    Code:
    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:

    Code:
    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:

    Code:
    jay@linux:/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
    jay@linux:/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:

    Code:
    jay@linux:~/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):
    jay@linux:~/src/ice/IcePy-3.0.1>
    Any help would be greatly appreciated!

    Thanks,
    Jay
    Jason Gaudette
    University of Rhode Island
    Evaluating Ice for networking class

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    It looks like you haven't added /opt/Ice-3.0.1/lib to your LD_LIBRARY_PATH.

  3. #3
    jay
    jay is offline Registered User
    Join Date
    May 2006
    Location
    RI, USA
    Posts
    2
    That did the trick, thanks!
    Jason Gaudette
    University of Rhode Island
    Evaluating Ice for networking class

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2011, 07:32 PM
  2. Replies: 1
    Last Post: 06-09-2009, 10:53 PM
  3. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  4. Replies: 4
    Last Post: 10-26-2006, 11:23 AM
  5. Creating Proxies for "Ice objects" with Python
    By hiasl in forum Help Center
    Replies: 5
    Last Post: 09-13-2005, 10:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •