ipython with numpy+scipy+matplotlib Installation Procedures: (as of April 2012)
1. Install some packages from cygwin setup.exe:
* liblapack
* fortran compilers and some fortran packages (best to download all related to fortran)
* libgfortran
* python packages
* libpng
* freetype2
* c/c++ compilers
* libboost
2. Install libffi (required for ipython)
* Download libffi-3.0.11
* Extract folder
* Configure the installation
./configure
* Install
make install
3. Install ATLAS (Automatic Tuned Linear Algebra Software) (required for numpy+scipy)
* caution: this installation may cause stress due to the installation time, which may take all day.
* Download atlas-3.8.4
* Extract folder
* Make build folder (Installation procedure is written inside INSTALL.txt)
mkdir cygwin_build
* Configure (there is only 32-bit version)
../configure -b 32
* Install
make
make check
make ptcheck
make time
make install
4. Install nose (testing package for scipy+numpy)
* Download nose-1.1.2
* Extract folder
* Build file
python setup.py build
* Install
python setup.py install
5. Install numpy (required for matplotlib and for.... python programmer.)
* Download numpy-1.6.1
* Extract folder
* Build file (I faced some bugs when doing this, if you also happen to face them, I'll try my best to help)
python setup.py build
* Install
python setup.py install
6. Install scipy (required for.... python programmer.)
* Download scipy-0.10.1
* Extract folder
* Build file
python setup.py build (also some bugs here)
* Install
python setup.py install
7. Install matplotlib (required for ipython)
* Download matplotlib-1.1.0
* Extract folder
* Copy the setup.cfg.template to setup.cfg
cp setup.cfg.template setup.cfg
* Uncomment line 70
tkagg = False
* Try to build the program
python setup.py build
* If there is an error saying unable to remap a dll file or such, we have to run the rebase command of cygwin, using CO\MMAND PROMPT:
cd C\cygwin\bin
ash
PATH=. rebaseall -v
...wait until it finishes
* Try to build the program once again
python setup.py build
* Look at the pkg_config, if it says it's not configured right for libffi package, put this in your .bashrc:
export PKG_CONFIG_PATH=/usr/local/lib/pkconfig (after making sure that libffi.pc is here)
* And also make sre that you satisfied all dependencies.
* After the build succeed, install
python setup.py install
8. FINALLY. Install ipython.
* Download ipython-0.12
* Extract folder
* Build file
python setup.py build (also some bugs here)
* Install
python setup.py install
9. Now that we finished all installations, let's run some tests.
* open ipython
ipython --pylab
* show a sin(x) figure
x = arange(-5,5,0.1)
y = sin(x)
plot(x,y)
savefig("sin_x.png")
* And that code should have shown you a figure of a beautiful sin(x) wave:
No comments:
Post a Comment