Diferencia entre revisiones de «Tutorial Python Alex 19-10-12»

De Grupo de Inteligencia Computacional (GIC)
Sin resumen de edición
Sin resumen de edición
Línea 10: Línea 10:
For Ubuntu repository versions:
For Ubuntu repository versions:
  <font face="monospace">
  <font face="monospace">
  $ sudo apt-get install ipython python-numpy python-scipy python-mvpa2 python-matplotlib git python-pip python-nibabel cython python-statsmodels python-sklearn python-skimage
  sudo apt-get install ipython python-numpy python-scipy python-mvpa2 python-matplotlib git python-pip python-nibabel cython python-statsmodels python-sklearn python-skimage
  </font>
  </font>


For updated versions we can use [http://pypi.python.org/pypi Python Package Index (PyPI)]:
For updated versions we can use [http://pypi.python.org/pypi Python Package Index (PyPI)]:
  <font face="monospace">
  <font face="monospace">
  $ sudo apt-get install python-pip python-dev build-essential  
  sudo apt-get install python-pip python-dev build-essential  
  $ sudo pip install -U pip
  sudo pip install -U pip
  $ sudo pip install -U ipython
  sudo pip install -U ipython
  $ sudo pip install -U cython
  sudo pip install -U cython
  $ sudo pip install -U numpy  
  sudo pip install -U numpy  
  $ sudo apt-get install build-essential gfortran libblas-dev liblapack-dev libumfpack5.4.0
  sudo apt-get install build-essential gfortran libblas-dev liblapack-dev libumfpack5.4.0
  $ sudo pip install -U scipy  
  sudo pip install -U scipy  
  $ sudo pip install -U pandas
  sudo pip install -U pandas
  $ sudo pip install -U scikit-image scikit-learn statsmodels
  sudo pip install -U scikit-image scikit-learn statsmodels
  </font>
  </font>


Línea 29: Línea 29:
  [http://nipy.sourceforge.net/ Nipy]
  [http://nipy.sourceforge.net/ Nipy]
  <font face="monospace">
  <font face="monospace">
  $ sudo pip install -U sympy
  sudo pip install -U sympy
  $ sudo pip install -U nibabel nipype nipy
  sudo pip install -U nibabel nipype nipy
  $ sudo pip install -U dipy nitime
  sudo pip install -U dipy nitime
  </font>
  </font>


Línea 59: Línea 59:
How to install a few of them:
How to install a few of them:
  <font face="monospace">
  <font face="monospace">
  $ sudo apt-get install ipython
  sudo apt-get install ipython
  $ sudo apt-get install ipython-qtconsole
  sudo apt-get install ipython-qtconsole
  $ sudo apt-get install spyder
  sudo apt-get install spyder
  $ sudo apt-get install eric
  sudo apt-get install eric
  $ sudo apt-get install reinteract
  sudo apt-get install reinteract
  </font>
  </font>



Revisión del 14:26 19 oct 2012

Python Tutorial

Author: Alex, October 19th, 2012

  • Install the software
Base OS: Ubuntu 12.04.1

For Ubuntu repository versions:


sudo apt-get install ipython python-numpy python-scipy python-mvpa2 python-matplotlib git python-pip python-nibabel cython python-statsmodels python-sklearn python-skimage

For updated versions we can use Python Package Index (PyPI):


sudo apt-get install python-pip python-dev build-essential 
sudo pip install -U pip
sudo pip install -U ipython
sudo pip install -U cython
sudo pip install -U numpy 
sudo apt-get install build-essential gfortran libblas-dev liblapack-dev libumfpack5.4.0
sudo pip install -U scipy 
sudo pip install -U pandas
sudo pip install -U scikit-image scikit-learn statsmodels

Neuroimaging:

Nipy

sudo pip install -U sympy
sudo pip install -U nibabel nipype nipy
sudo pip install -U dipy nitime


How to install a few of them:


sudo apt-get install ipython
sudo apt-get install ipython-qtconsole
sudo apt-get install spyder
sudo apt-get install eric
sudo apt-get install reinteract

Download data: http://www.ehu.es/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes http://www.ehu.es/ccwintco/uploads/a/a3/Salinas_corrected.mat http://www.ehu.es/ccwintco/uploads/f/fa/Salinas_gt.mat sklearn_on_salinas.py in zip file

 $ git clone https://github.com/nisl/tutorial.git
 $ cd tutorial
 $ sudo python setup.py install
 $ ipython
 http://nisl.github.com/auto_examples/plot_ica_resting_state.html#example-tutorial-plot-ica-resting-state-py

  • Cleanup before leaving... ?

$ sudo pip uninstall nisl 
$ rm -r tutorial