Home Help Center

Installing Ice 3.3.1 on Red Hat Enterprise 5

genetics_labgenetics_lab Member Steven FlygareOrganization: University of UtahProject: Omero
Hello! I am trying to install Ice 3.3.1 on a machine running Red Hat Enterprise 5. I need to use version 3.3.1 for the specific application that we are trying to run (Omero). Yum was used for the install. Specifically, the problem I am having is I need to be able to use the python module Ice. Like I said, I used Yum for the install but python can't find the module. I have tried adding where Ice was installed to the python sys path, but it still can't find the module. Is there something extra I need to install or run to get access to the python module?

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Steven,

    Welcome to the forum.

    The RHEL5 RPMs that we provide require Python 2.4 (the default version used by RHEL5). The ice-python RPM installs /usr/lib/python2.4/site-packages/ice.pth, which adds the Ice for Python code to Python's default search path.

    Are you using the default Python installation?

    Regards,
    Mark
  • genetics_labgenetics_lab Member Steven FlygareOrganization: University of UtahProject: Omero
    Hi Mark,

    Thanks for the reply. I am not using the default Python installation. I have Python 2.6.5 installed at /usr/local/Python-2.6.5. Your comments lead me to a couple of questions:

    1. Can Ice be used with Python 2.6.5?

    2. I just checked the directory /usr/lib/python2.4/site-packages/ because that is where you mentioned Ice would install to. I also have the default Python 2.4 installation, however, for my current project I need to use at least Python 2.5. Anyway, I checked the directory /usr/lib/python2.4/site-packages/ and the ice.pth file is not there. Perhaps the install did not work?

    I have all the rpm files in /usr/local/Ice. Is there a way I can fix my install using these files?

    Thanks,

    Steven
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    You can use Ice for Python with Python 2.6.5, but in this case you can't use our Ice for Python RPMs. Instead you'll need to build Ice for Python from sources. To save time, you really only need to do the following:

    % tar xzf Ice-3.3.1.tar.gz
    % cd Ice-3.3.1/cpp
    ## Review INSTALL.LINUX
    % cd src
    % make
    % cd ../../py
    % python -V
    ## Make sure Python 2.6.5 is first in your PATH
    ## Review INSTALL
    % make
    % make install

    In other words, you're building a subset of the C++ language mapping sources, as well as the Python language mapping. You only need to install Ice for Python from this build; you can continue using the other Ice components that you installed via RPMs.

    Hope that helps,
    Mark
  • genetics_labgenetics_lab Member Steven FlygareOrganization: University of UtahProject: Omero
    Thanks for the reply. I tried following your instructions, but ran into the following error with the first make command:

    /usr/bin/ld: cannot find -lmcpp

    I found in this forum a page that seemed to address this issue, the link is http://www.zeroc.com/forums/help-center/4152-ice-build-error-solaris-9-ld-cannot-find-lmcpp.html.

    I tried following the instructions given in the forum and installed the standalone compiler independent build. However, I am still getting the same error: /usr/bin/ld: cannot find -lmcpp.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Right, you'll need to install MCPP. I recommend installing our RPM for i386 or x86_64.

    Regards,
    Mark
  • genetics_labgenetics_lab Member Steven FlygareOrganization: University of UtahProject: Omero
    I did get MCPP installed. I followed the instructions posted above for installing Ice and everything built and appeared to install correctly. However, Python still can't find the module Ice. Not really sure where to go from here.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    You don't say how you're trying to configure Python to use Ice. I just followed my instructions and built Ice for Python with Python 2.6.5 on RHEL5.4, installed it into /opt/Ice-3.3.1, and set PYTHONPATH as follows:

    export PYTHONPATH=/opt/Ice-3.3.1/python

    Everything works fine when I execute import Ice in the interpreter.

    Regards,
    Mark
  • genetics_labgenetics_lab Member Steven FlygareOrganization: University of UtahProject: Omero
    Hi Mark,

    Thanks for your advice. My installation of python is now finding Ice. You were right about my environment variables. I just added the following to my etc/profile:

    export ICEPY_HOME=/opt/Ice-3.3.1
    export PYTHONPATH=$ICEPY_HOME/python:$PYTHONPATH
    export PATH=`pwd`/bin:$PATH
    export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH

    where pwd = /usr/local/Ice-3.3.1/cpp

    It all seems to be working fine. :)

    Thanks again,

    -Steven
Sign In or Register to comment.