Pyroms installing problem

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
FangFang
Posts: 8
Joined: Fri Oct 26, 2007 4:13 pm
Location: Third Institute of Oceanography State Oceanic Administration(SOA),China

Pyroms installing problem

#1 Unread post by FangFang »

When I try to install pyroms, i came across the error as follow:

File "/home/kff/software/pyroms/pyinstall.py", line 1, in ?
from numpy.distutils.fcompiler import get_default_fcompiler
ImportError: No module named numpy.distutils.fcompiler
make[2]: *** [CMakeFiles/pyroms] Error 1
make[1]: *** [CMakeFiles/pyroms.dir/all] Error 2
make: *** [all] Error 2

I use the CentOS from Rob when we were in Hongkong. The fortran compiler is gfortran and i think numpy,matplotlib have been installed well.

Thanks for any help.

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Pyroms installing problem

#2 Unread post by linzhenhua »

It seems that you have not installed numpy. You can check if you have the directory:

/usr/lib/Your_Python_version/site-packages/numpy/distutils/fcompiler

Your_Python_version is the python version in your system, python2.6 in my system.


If you indeed have installed numpy package, then I doubt whether this is caused by its version number. Since the packages come with Centos are relatively outdated. Try install one of the recent versions of numpy then.

cermak
Posts: 4
Joined: Sun Mar 15, 2009 8:21 pm
Location: Arctic Region Supercomputing Center

Re: Pyroms installing problem

#3 Unread post by cermak »

It certainly looks like numpy is not installed. You can also try:

[root@localhost ~]# python -c "import numpy"
[root@localhost ~]#

If it returns without an error, then numpy is likely installed properly. If you get errors, then numpy needs to be installed.

Be aware, netCDF4, numpy, matplotlib, scipy and basemap python modules have a modest amount of software it expects to find before it can build from source.

On the i386 CentOS 5.5 images for VirtualBox, numpy was installed in /usr/local. By default, python modules for most systems are installed in /usr/lib, so an environment variable is needed for non-standard installations (i.e. your home directory).

export PYTHONPATH=/usr/local/lib/python2.4/site-packages:/usr/local/lib/python2.4/site-packages/PyNGL:/usr/local/lib/python2.4/site-packages/PyNIO

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.5/site-packages:/usr/local/lib/python2.5/site-packages/PyNGL:/usr/local/lib/python2.4/site-packages/PyNIO

export LD_LIBRARY_PATH=/usr/local/lib

export NCARG_ROOT=/usr/local

export PYNGL_NCARG=/usr/local/lib/python2.4/site-packages/PyNGL/ncarg

The path where numpy is on the i386 CentOS 5.5 image is:

/usr/local/lib/python2.4/site-packages

The other paths above is to support PyNGL and PyNIO (NCAR Graphics and I/O [netcdf] python libraries).

The LD_LIBRARY_PATH is needed for shared libraries (.so) that are found in /usr/local/lib.

Compiled software generally used:

./configure --prefix=/usr/local
make
make install

Python modules:

python setup.py build
python setup.py install --prefix=/usr/local

Perl modules:

perl Makefile.PL PREFIX=/usr/local
make
make install

Installing to /usr/local will only work if you have *administrative* privileges. Otherwise you can set the prefix (/usr/local) to someplace you have permission, say for example: $HOME/local

Attached are three text files, not in the greatest condition, but should give you an idea of the software that I loaded to make sure everything works.
Attachments
bashrc_history_pyroms.txt
I was also asked to post the bash command history for the installation of pyroms.

For i386 builds of pyroms, be sure to remove two references to -m64.
(2.55 KiB) Downloaded 371 times
CentOS_5.5_i386.txt
Software description for the 32-bit CentOS 5.5 VirtualBox images
(3.73 KiB) Downloaded 383 times
Workshop_software_CentOS_5.5.txt
Software description for the 64-bit workstations
(4.39 KiB) Downloaded 345 times

cermak
Posts: 4
Joined: Sun Mar 15, 2009 8:21 pm
Location: Arctic Region Supercomputing Center

Re: Pyroms installing problem

#4 Unread post by cermak »

As a small follow up, it may not find numpy if a path in the configuration process of ccmake is not right. Attached is a screenshot of ccmake.

For i386 builds of pyroms, these files should be edited, in the pyroms
directory:

Code: Select all

external/gridgen/CMakeLists.txt:set(CFLAGS "-g -O2 -Wall -m64 -fPIC")
external/gridgen/makefile:CFLAGS = -g -O2 -Wall -m64 -fPIC
external/gridutils/CMakeLists.txt:set(CFLAGS "-g -O2 -Wall -pedantic -m64 -fPIC")
external/gridutils/makefile:CFLAGS = -g -O2 -Wall -pedantic -m64 -fPIC
Change to:

Code: Select all

external/gridgen/CMakeLists.txt:set(CFLAGS "-g -O2 -Wall -fPIC")
external/gridgen/makefile:CFLAGS = -g -O2 -Wall -fPIC
external/gridutils/CMakeLists.txt:set(CFLAGS "-g -O2 -Wall -pedantic -fPIC")
external/gridutils/makefile:CFLAGS = -g -O2 -Wall -pedantic -fPIC
Attachments
What ccmake should show with the CentOS 5.5 Virtual Box image.
What ccmake should show with the CentOS 5.5 Virtual Box image.
pyroms_ccmake.png (45.39 KiB) Viewed 5094 times

FangFang
Posts: 8
Joined: Fri Oct 26, 2007 4:13 pm
Location: Third Institute of Oceanography State Oceanic Administration(SOA),China

Re: Pyroms installing problem

#5 Unread post by FangFang »

Thanks to linzhenhua and rob. Finally I find out the problem. I added a new user on the CentOS and try to install pyroms under the user but not root. Perhaps that is why I got into trouble.
When I login in as root again,follow the installing guide rob posted, everything works fine now.

Post Reply