[Numpy-discussion] Installing on CentOS 5 claims invalid Python installation

Roger Martin roger at quantumbioinc.com
Mon Dec 27 14:40:11 EST 2010

Hi Bruce and Chris,

This was a user build and install of Python (particularly 2.6.6 since 
2.7.1 has build troubles on CentOS 5).  The original python 2.4 in the 
system is ignored for this effort because I can't get to it.  Since I 
was unfamiliar with building Python from source I didn't know it should 
produce python development where the --prefix points the install. It is 
supposed to under the altinstall target.

By looking at the make I found(with the autoconf 2.63 version) the make 
altinstall target simply wasn't running all its subtargets even though 
no install error occurred.  Ran the inclinstall, libainstall,  
sharedinstall targets and the distribution was populated with the devel 
components needed!
In fact the top of the configure.in of python 2.6.6 source build it says
dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.61).
and I was at 2.63; not sure if same problem they were noting.
./configure --prefix=/home/roger/Python-2.6.6/dist
#make test
make altinstall
make inclinstall
make libainstall
make sharedinstall
#make oldsharedinstall

   This is all python install issues and has nothing to do with numpy 
install.  The numpy install followed:
export PYTHONPATH=/home/roger/Python-2.6.6/dist/lib/python2.6
export PYTHONHOME=/home/roger/Python-2.6.6/dist

export MKLROOT=/share/apps/intel/mkl/
export PATH=/home/roger/Python-2.6.6/dist/bin:$PATH

export PYTHONHOME=/home/roger/Python-2.6.6/dist
export PATH=/home/roger/Python-2.6.6/dist/bin:$PATH
#python2.6 setup.py clean
python2.6 setup.py build --fcompiler=gnu95
python2.6 setup.py install

Then a quick test:
Python 2.6.6 (r266:84292, Dec 22 2010, 13:28:53)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import numpy
 >>> a = numpy.arange(10).reshape(2,5)
 >>> a
array([[0, 1, 2, 3, 4],
        [5, 6, 7, 8, 9]])
Tested successfully!

Python 3.2 didn't have any of the python install issues and numpy 
installs and functions on it too.

Now on to h5py utilizing numpy.  Thanks for the discussion; you lead me 
to understand when building python from source the devel portion should 
be there,


On 12/23/2010 02:58 PM, Bruce Southey wrote:
> On 12/23/2010 07:13 AM, Roger Martin wrote:
>> Hi,
>> NumPy looks like the way to get computation done in Python.  Now I'm 
>> going through the learning curve of installing the module into 
>> different linux OS's and Python versions.  An extra need is to 
>> install google code's h5py http://code.google.com/p/h5py/ which 
>> depends on numpy.
>> In trying a number of Python versions the 2.x's are yielding the 
>> message " invalid Python installation"
>> ---------------
>>     raise DistutilsPlatformError(my_msg)
>> distutils.errors.DistutilsPlatformError: invalid Python installation: 
>> unable to open 
>> /home/roger/Python-2.6.6/dist/lib/python2.6/config/Makefile (No such 
>> file or directory)
>> ---------------
>> From reading on the web it appears a Python-2.x.x-devel version is 
>> needed.  Yet no search combination comes back with where to get such 
>> a thing(note: I need user installs/builds for security reasons).  
>> Where are Python versions  compatible with numpy?
>> Building
>> 	Python-2.6.6
>> 	Python-2.7.1(fails to build)
>> 	Python3.2beta2
>> numpy1.5.1
>> 	invalid Python installation 	NA
>> 	success
>> h5py1.3.1
>> 	needs numpy
>> 	NA
>> 	fails
>> To start I need just one successful combination but will need more 
>> cases depending on users of a new integration project.
>> Interestingly your numpy 1.5.1's setup is in good shape to build with 
>> Python3.2 yet I need to allow older versions for people's systems not 
>> ready to upgrade that far.
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> I thought that Centos 5 ships Python 2.4 so how did you get Python 
> 2.6, 2.7 and 3.2?
> If these are from some repository then the developmental libraries 
> should also be there - if these are not there then either find another 
> repository or build Python yourself.
> Bruce
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20101227/cd0662b7/attachment.html>

More information about the NumPy-Discussion mailing list