great work! 
When using RHEL/CENTOS python > 2.4 remember to use also the yum-priorities 
package in order to avoid python libraries overwritings which will break the 
system. You can follow this guide 
http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/
Also, if you really don't wanna mess up your python2.4 installation and you 
want to try out different libraries with different configurations on 2.6 I find 
"virutalenv" very comfortable used in conjunction with pip or easy_install. 
http://pypi.python.org/pypi/virtualenv
By the way, I'm splitting in two the CASPER control stuff as bee_xps on CENTOS 
and control/acquisition/postelaboration on UBUNTU which makes things really 
easier.

regards,
Marco Bartolini

Il giorno 09/set/2010, alle ore 23.35, Aaron Parsons ha scritto:

> I am not the keeper of the CASPER wiki, so I will forward this to the
> CASPER list.
> 
> On Thu, Sep 9, 2010 at 2:28 PM, Mandana Amiri <mand...@phas.ubc.ca> wrote:
>> Hi Aaron,
>> 
>> I took notes when I was installing python stuff on my two RHEL5.2 systems. I
>> was hesitating whether it's worth adding it to your wiki page. I'm not a
>> unix superuser by any means, so please review at your convenience and if you
>> think they are useful to others, I will add them in.
>> 
>> Regards,
>> mandana
>> 
>> Setting up Python
>> 
>> Follow steps in http://casper.berkeley.edu/wiki/Corr
>> RHEL5 comes with python2.4, the corr page (above) asks for python 2.6,
>> therefore parallel installation of python2.6 is needed.
>> When you get to installing Corr package, it turns out that you need numpy
>> first.
>> Install python26-devel from epel, then python26-distribute to get
>> easy_install-2.6
>> Follow numpy instructions to install numpy on SciPy.org. Building numpy from
>> source requires installing gcc-c++, gfortran. one may use ATLAS or lapack.
>> When configuring ATLAS, replace outdated --with-netlib option with -Ss
>> flapack (see ../configure --help)
>> When configuring ATLAS, there is a message about not being able to tune, so
>> we needed to turn off CPU throttling: su -c /usr//bin/cpufreq-selector -g
>> performance" (see ATLAS README.txt)
>> After painful installation of ATLAS, it turns out that ATLAS is broken and
>> we need to use BLAS and LAPACK, download blas, cblas, and lapack and build
>> them and install them. Now one can build and install numpy. For some reason
>> numpy1.5.2 doesn't work and numpy-1.4.1 works.
>> To be able to plot, install matplotlib which requires scipy (??) and a
>> graphical backend.
>> 
>> run
>> 
>> $python2.6 setup.py config
>> # if there is anything listed for graphical backend, then proceed with
>> build and install.
>> $python2.6 setup.py build
>> $sudo python2.6 setup.py install
>> 
>> continue
>> 
>> If there were more than one graphical backend listed during configuration,
>> then modify matplotlibrc file to choose your preferred backend. (look for
>> keyword 'backend'). Tkinter or tk seem to be compatible with casper scripts.
>> If there is no graphical backend listed, then proceed to installing a
>> graphical backend first.
>> The choice of backend was: gtk++, qt, or wxpython. gtk++ required pygobject
>> glib2 (!) and the problem was that when building it, it would go to
>> pygobject for 2.4. So the build wasn't succesful. Then we couldn't find qt
>> for python2.6. Built wxpython from source which required manually copying
>> libraries to /usr/lib64/python2.6.
>> how to build wxwidget or wxpython
>> 
>> Then run python2.6, import matplotlib.pylab and import numpy work and
>> plotting works!
>> 
>> now import corr and if it fails, you need to easy_install-2.6 inparse
>> 
>> ----------------------------------------------
>> Here is how to build wxwidget or wxpython:
>> 
>> Downloaded 2.8.11.0 from www.wxpython.org
>> We need to make a separate version of wxwidget:
>>   $ ./configure --prefix=/opt/wx
>>   $ make
>>   $ ( cd contrib && make )
>>   $ make install
>>   $ cp lib/wx/include/<something>/wx/setup.h /opt/wx/include/wx-2.8/wx
>> (<something> is usually gtk2-unicode-release-2.8)
>>   Change directory to /opt/wx/include
>>   $ ln -s wx-2.8 wx
>>   Change back to source directory:
>>   $ cd wxPython
>>   Edit config.py:
>> 
>>     Set BUILD_GLCANVAS = 0
>>     Set UNICODE = 0
>>     Set WX_CONFIG = "/opt/wx/bin/wx-config"
>> 
>>   $ python2.6 setup.py config
>>   $ python2.6 setup.py build
>>   $ sudo python2.6 setup.py install
>>   $ cd /usr/lib/python2.6/site-packages
>>   $ cp wx* /usr/lib64/python2.6/site-packages/
>> 
>>   Add the following line to /etc/ld.so.conf:
>>   /opt/wx/lib
>>   and then run ldconfig.
>> 
>> 
> 
> 
> 
> -- 
> Aaron Parsons
> 
> 510-406-4322 (cell)
> Campbell Hall 523, UCB
> 


Reply via email to