The workflow:
NOTE: use the --prefix /usr flag if setup.py installs in the wrong directory.
1. make sure you do not have the repository stuff installed or old versions:
sudo apt-get remove python-scipy python-numpy python-matplotlib python-gnuplot2. obtain source code if you do not have it yet:
sudo rm -rf /usr/lib/python2.6/site-packages
sudo rm -rf /usr/lib/python2.6/dist-packages/numpy
sudo rm -rf /usr/lib/python2.6/dist-packages/scipy
sudo rm -rf /usr/lib/python2.6/dist-packages/matplotlib
sudo rm -rf /usr/lib/python2.6/dist-packages/scikits*
svn co http://svn.scipy.org/svn/numpy/trunk numpy
svn co http://svn.scipy.org/svn/scipy/trunk scipysvn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib
svn co https://gnuplot-py.svn.sourceforge.net/svnroot/gnuplot-py/trunk gnuplot-py
svn co http://svn.scipy.org/svn/scikits/trunk/odes odes
sudo apt-get install python-dev python-setuptoolsFor matplotlib, gtk backend, see build depend of the ubuntu package.
I used:
sudo apt-get install libpng-dev libgtk2.0-dev python-gtk2-dev python-imaging python-qt4 python-qt4-dev python-tz python-wxgtk2.8 zlib1g-dev libfreetype6-dev
4. go to numpy, update, compile, and install. Normally you need to remove /usr/lib/python2.6/site-packages/scipy or /usr/lib/python2.6/dist-packages/scipy and same for numpy first, but as python2.6 is new, those are not present.
cd numpy
sudo rm -rf build
svn up
sudo python setup.py install --install-layout=deb
cd scipy
sudo rm -rf build
svn up
sudo python setup.py install --install-layout=deb
cd matplotlib
sudo rm -rf build
svn up
sudo python setup.py install --install-layout=deb
3. Now I can reinstall my own module in scikits
cd programs/odesAbove works only on first install. Afterwards I obtain an error with zip files?? To resolve
sudo rm -rf build
svn up
sudo python setup.py install --install-layout=deb
rm -rf /usr/lib/python2.6/dist-packages/scikits/odesAnd then it is time to test if all is working again.
sudo rm -rf build
sudo python setup.py install --single-version-externally-managed --root / --install-layout=deb
Interesting resource: python distutils
Geen opmerkingen:
Een reactie posten