Page 1 of 3

setting PYTHONPATH variable doesn't "stick"

PostPosted: Tue Jul 16, 2013 4:41 am
by Alan H
I'm installing ver. 4.4.8 on Cent OS 5. I've got Python 2.3 and 2.4 installed. Ice is ver 3.3 I've nicely downloaded all the Ice site packages and everything went just fine EXCEPT that it all installed in the Python 2.3 directories. ...not the 2.4 directory. Hmm.

Quenstion 1 a) When I go to configure omero ---

bin/omero config set omero.db.name 'omero'

All afternoon I got this message about how it can't find Ice. OK, so I looked over my PYTHONPATH and lo and behold it refers umpty-ump times to paths that include python 2.4, not 2.3 where all my site directories are. So I did this, just like it says in the CentOS installation guide:

export PYTHONPATH=$PYTHONPATH:/usr/lib64/python2.3/site-packages/Ice

and even PYTHONPATH=${PYTHONPATH}:/usr/lib64/python2.3/site-packages/Ice
just like it says to do in the nifty CentOS instructions guide I downloaded and it seems fine. When I go look ...

echo $PYTHONPATH

my export command hasn't appended the python 2.3 directories to the path. GRRRRR. Of course I still can't figure omero because it can't find ICE. I know stuff I write with the export command will go away after I log out, but it wasn't written AT ALL. What's wrong?

Question 1 b. In frustration, I finally edited my ~/.bash_profile ( as root) and put in

export PYTHONPATH=${PYTHONPATH}:/usr/lib64/python2.3/site-packages/Ice/

actually I did this for both root and "omerouser", and now it can find ICE, but is this going to work for all my various users when they log in with their own accounts via omero.insight etc?

Question 2

I've unzipped the OMERO.server-4.4.8-ice33-b256.zip file. I've renamed the directory that it created "OMERO". Ok, it's wonky, there's an OMERO directory inside the /etc/OMERO directory but it should still be fine. Now when I try to run

bin/omero config set omero.db.name 'omero'

it's telling me that it can't find '/OMERO/OMERO/etc/grid/config.xml'

...and in fact that file isn't there. Also, there is no omero_dist directory to be found. I'm sure I'm doing something dumb, like unzipping the Omero download, but not installing or something, but what is the dumb thing I'm doing?

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Tue Jul 16, 2013 9:02 am
by cblackburn
Hi Alan,

Thanks for the post. The OMERO server has a minimum requirement of Python 2.4 on Linux systems. The system requirements for an OMERO server are detailed here:

OMERO.server system requirements

If you can set up your system so that it is using the Python 2.4 installation, and meeting the other requirements, and then run through the OMERO installation again you should be okay. If you still have problems after that please get back in touch.

Cheers,

Colin

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Tue Jul 16, 2013 4:44 pm
by kennethgillen
Hi Alan,

A quick note to say that if you've not seen our OMERO Linux Installation Walkthrough, you may well find it useful.

Best,

Kenny

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Tue Jul 16, 2013 5:28 pm
by Alan H
Well. There you go. Time to blitz the Python 2.3 install!

Thanks to both of you... Hey, the L inux walkthough is for Debian/Ubunu...this is Red Hat/CentOS. I actually did read that walkthrough before I started.

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Tue Jul 16, 2013 10:37 pm
by Alan H
OK, I saw no way to uninstall Python 2.3, so I just deleted the directory

/usr/lib64/python2.3

This of course removed the /usr/lib64/python2.3/site-packages/Ice directory, too. Now I looked at the /usr/lib64/python2.4/site-packages directory, and there's no Ice directory there. GRRR....but *OK, fine....... So I tried reinstalling all the Ice packages. No go, yum reports that they're already installed...so I used yum to remove all the ICE packages, and then used yum and reinstalled them again. Everything went swimmingly...

... except that there's still no Ice directory in /usr/lib64/python2.4/site-packages

without that, $PYTHONPATH isn't going to find Ice. I don't get why installing the packages didn't register them with Python. OK, Now what?

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Tue Jul 16, 2013 11:01 pm
by Alan H
Took me a while, like a full day, to figure this out....omero_dist .. the "dist" is the distribution code of that build or beta or whatever. Like

OMERO.server-4.4.8-ice33-b256 ---- the "dist" = "server-4.4.8-ice33-b256"

See, you have to talk to me like a 4th grader or I don't get it! :roll:

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Wed Jul 17, 2013 8:56 am
by manics
Hi Alan

Did you use the RPMs from the Zeroc website? Can you run the following commands and paste the output here?:

Code: Select all
rpm -qa python\*


Code: Select all
rpm -qil ice-python

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Wed Jul 17, 2013 6:20 pm
by Alan H
Code: Select all
[root@omero-serv1 ~]# rpm -qa python\*
python-elementtree-1.2.6-5
python-urlgrabber-3.1.0-2
python-2.4.3-56.el5
python-sqlite-1.1.7-1.2.1
python-iniparse-0.2.3-4.el5
python-libs-2.4.3-56.el5

--------------------------

Code: Select all
[root@omero-serv1 ~]# rpm -qil ice-python
Name        : ice-python                   Relocations: (not relocatable)
Version     : 3.3.1                             Vendor: ZeroC, Inc.
Release     : 1.rhel4                       Build Date: Fri 20 Mar 2009 04:22:00 PM PDT
Install Date: Tue 16 Jul 2013 02:52:38 PM PDT      Build Host: rhel4x64.wpb.zeroc.com
Group       : System Environment/Libraries   Source RPM: ice-3.3.1-1.rhel4.src.rpm
Size        : 2546401                          License: GPL with exceptions
Signature   : DSA/SHA1, Fri 20 Mar 2009 04:22:11 PM PDT, Key ID 5e6da83306132997
URL         : http://www.zeroc.com/
Summary     : The Ice runtime for Python
Description :
The Ice runtime for Python.
/usr/lib64/python2.3/site-packages/Ice
/usr/lib64/python2.3/site-packages/Ice/Glacier2
/usr/lib64/python2.3/site-packages/Ice/Glacier2/__init__.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_PermissionsVerifierF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_PermissionsVerifier_ice.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_RouterF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_Router_ice.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_SSLInfo_ice.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_SessionF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Glacier2_Session_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice.py
/usr/lib64/python2.3/site-packages/Ice/IceBox
/usr/lib64/python2.3/site-packages/Ice/IceBox/__init__.py
/usr/lib64/python2.3/site-packages/Ice/IceBox_IceBox_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid
/usr/lib64/python2.3/site-packages/Ice/IceGrid/__init__.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Admin_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Descriptor_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Exception_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_FileParser_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Locator_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Observer_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Query_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Registry_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_Session_ice.py
/usr/lib64/python2.3/site-packages/Ice/IceGrid_UserAccountMapper_ice.py
/usr/lib64/python2.3/site-packages/Ice/IcePatch2
/usr/lib64/python2.3/site-packages/Ice/IcePatch2/__init__.py
/usr/lib64/python2.3/site-packages/Ice/IcePatch2_FileInfo_ice.py
/usr/lib64/python2.3/site-packages/Ice/IcePatch2_FileServer_ice.py
/usr/lib64/python2.3/site-packages/Ice/IcePy.so
/usr/lib64/python2.3/site-packages/Ice/IcePy.so.3.3.1
/usr/lib64/python2.3/site-packages/Ice/IcePy.so.33
/usr/lib64/python2.3/site-packages/Ice/IceStorm
/usr/lib64/python2.3/site-packages/Ice/IceStorm/__init__.py
/usr/lib64/python2.3/site-packages/Ice/IceStorm_IceStorm_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_BuiltinSequences_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_CommunicatorF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Communicator_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ConnectionF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Connection_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Current_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Endpoint_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_FacetMap_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Identity_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ImplicitContextF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ImplicitContext_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_LocalException_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_LocatorF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Locator_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_LoggerF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Logger_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ObjectAdapterF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ObjectAdapter_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ObjectFactoryF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ObjectFactory_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_PluginF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Plugin_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ProcessF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Process_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_PropertiesF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Properties_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_RouterF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Router_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ServantLocatorF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_ServantLocator_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_SliceChecksumDict_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_StatsF_ice.py
/usr/lib64/python2.3/site-packages/Ice/Ice_Stats_ice.py
/usr/lib64/python2.3/site-packages/ice.pth


All the packages are for Python 2.3, they install into /usr/lib64/python2.3 ...which I know. Hmmm. OK, so how to find the packages for Python 2.4? That's todays goal.

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Wed Jul 17, 2013 7:02 pm
by Alan H
I got the rpm's for Ice 3.4 from zeroc.com for Red Hat Enterprise...downloaded the tarball, expanded and tried installing the rpms. A few of them installed..

db48-4.8.24-1ice.rhel5.i386.rpm -- done
db48-devel-4.8.24-1ice.rhel5.i386.rpm -- done
db48-java-4.8.24-1ice.rhel5.i386.rpm -- done
db48-utils-4.8.24-1ice.rhel5.i386.rpm --done
ice-3.4.0-1.rhel5.noarch.rpm -- done
mcpp-devel-2.7.2-2ice.rhel5.i386.rpm -- done

a couple had file conflicts...

ice-java-3.4.0-1.rhel5.noarch.rpm --file /usr/share/java/Ice.jar from install of ice-java-3.4.0-1.rhel5.noarch conflicts with file from package ice-java-3.3.1-1.rhel4.noarch

ice-utils-3.4.0-1.rhel5.i386.rpm -- file conflicts

and the rest had failed dependencies...

ice-c++-devel-3.4.0-1.rhel5.i386.rpm
ice-java-devel-3.4.0-1.rhel5.i386.rpm
ice-php-3.4.0-1.rhel5.i386.rpm -- Failed dependencies:
php is needed by ice-php-3.4.0-1.rhel5.i386

ice-php-devel-3.4.0-1.rhel5.i386.rpm -- error: Failed dependencies:
ice-php = 3.4.0-1.rhel5 is needed by ice-php-devel-3.4.0-1.rhel5.i386

ice-ruby-3.4.0-1.rhel5.i386.rpm -- error: Failed dependencies:
libruby.so.1.8 is needed by ice-ruby-3.4.0-1.rhel5.i386


ice-ruby-devel-3.4.0-1.rhel5.i386.rpm -- error: Failed dependencies:
ice-ruby = 3.4.0-1.rhel5 is needed by ice-ruby-devel-3.4.0-1.rhel5.i386


ice-servers-3.4.0-1.rhel5.i386.rpm -- error: Failed dependencies:
ice-utils = 3.4.0-1.rhel5 is needed by ice-servers-3.4.0-1.rhel5.i386
libIceXML.so.34 is needed by ice-servers-3.4.0-1.rhel5.i386


ice-sqldb-3.4.0-1.rhel5.i386.rpm - error: Failed dependencies:
libIceDB.so.34 is needed by ice-sqldb-3.4.0-1.rhel5.i386
libIceStormService.so.34 is needed by ice-sqldb-3.4.0-1.rhel5.i386
libQtCore.so.4 is needed by ice-sqldb-3.4.0-1.rhel5.i386
libQtSql.so.4 is needed by ice-sqldb-3.4.0-1.rhel5.i386
qt4 is needed by ice-sqldb-3.4.0-1.rhel5.i386


There is still no Ice directory in /usr/lib64/python2.4/site-packages/
I tried running omero config set omero.db.name 'omero'

and now $PYTHONPATH finds the packages elsewhere, not in /usr/lib64/python2.4/site-packages

Code: Select all
[omerouser@omero-serv1 OMERO.server-4.4.8-ice33-b256]$ bin/omero config set omero.db.name 'omero'
********************************************************************************

        ERROR: Could not import omero.cli! (/usr/lib/python2.4/site-packages/Ice/IcePy.so: wrong ELF class: ELFCLASS32)

        This means that your installation is incomplete. Contact
        the OME mailing lists for more information:

        http://www.openmicroscopy.org/site/community

        If you are building from source, please supply the build log
        as well as which version you are building from. If you
        downloaded a distribution, please provide which link you
        used.
       
********************************************************************************

        Debugging Info:
        --------------
        CWD=/opt/OMERO.server-4.4.8-ice33-b256
        VERSION=2.4.3 (#1, Jan  9 2013, 06:47:03)  [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]
        OMERO_HOME=None
        PYTHONPATH=['/opt/OMERO.server-4.4.8-ice33-b256/lib/python', '/opt/OMERO.server-4.4.8-ice33-b256/var/lib', '/opt/OMERO.server-4.4.8-ice33-b256/bin', '/opt/OMERO.server-4.4.8-ice33-b256', '/usr/lib64/python2.4/site-packages/Ice', '/usr/lib64/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/Ice', '/opt/OMERO.server-4.4.8-ice33-b256/lib/fallback']
       
[omerouser@omero-serv1 OMERO.server-4.4.8-ice33-b256]$


Wrong ELFCLASS....I guess this is a 32-bit vs. 64-bit mismatch.

I swear, I'm considering blowing the entire machine away and reinstalling a Debian Linux. This is insane.

Re: setting PYTHONPATH variable doesn't "stick"

PostPosted: Wed Jul 17, 2013 7:13 pm
by rleigh
Code: Select all
ice-java-3.4.0-1.rhel5.noarch.rpm --file /usr/share/java/Ice.jar from install of ice-java-3.4.0-1.rhel5.noarch conflicts with file from package ice-java-3.3.1-1.rhel4.noarch


All you need to do here is remove the ice 3.3 packages first (rpm -e), and then install the ice 3.4 packages once they are gone so that you don't run into the conflict.

With regard to the python directory, there's an ice-python rpm which, once installed, will provide the needed bits and you won't need to set PYTHONPATH at all, because it will be in the standard search path.


Regards,
Roger Leigh