Created
December 5, 2010 00:30
-
-
Save piroux/728634 to your computer and use it in GitHub Desktop.
Install pylab on Ubuntu 10.04 (december 2010)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURWD=$(pwd) | |
ENVHOME=scilab | |
sudo apt-get -qq update && | |
sudo apt-get -qq install -y python2.6 python-virtualenv && | |
sudo apt-get -qq install -y libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev | |
if [ -d ./$ENVHOME ] | |
then | |
echo The virtual folder $ENVHOME already exists : | |
echo | |
ls -ld --color=auto $ENVHOME | |
exit | |
fi | |
virtualenv --no-site-package --distribute $ENVHOME | |
if [ -d ./$ENVHOME ] | |
then | |
cd ./$ENVHOME | |
else | |
exit | |
fi | |
source ./bin/activate | |
pip install hacker-top | |
pip install numpy | |
pip install scipy | |
pip install ipython | |
cd ./lib/python2.6 | |
#ln -s /usr/lib/pymodules/python2.6/package package | |
ln -s /usr/lib/pymodules/python2.6/gtk-2.0 gtk-2.0 | |
for i in gtk glib gobject gio atk.so pango.so pangocairo.so | |
do | |
ln -s /usr/lib/pymodules/python2.6/gtk-2.0/$i $i | |
done | |
for i in cairo pygtk.py pygtk.pyc pygtk.pth | |
do | |
ln -s /usr/lib/pymodules/python2.6/$i $i | |
done | |
cd $CURWD/$ENVHOME | |
# test : | |
python -c 'import gtk' && | |
pip install http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0/matplotlib-1.0.0.tar.gz | |
wget http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/simple_plot.py && | |
python simple_plot.py | |
echo You can now easily test : | |
echo python -pylab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment