Tools/Python Tools

(Difference between revisions)
Jump to: navigation, search
(Python(x,y) 2.7.3.1)
(Python(x,y) 2.7.3.1)
Line 45: Line 45:
 
==== Python(x,y) 2.7.3.1 ====
 
==== Python(x,y) 2.7.3.1 ====
  
During the installation make sure to have ''pip'' selected in the list of available modules.
+
During the installation make sure to have ''pip'' selected in the list of available ''Python'' modules.
  
To update ''spyder'' to the current version you have to remove the old one first.
+
===== Spyder IDE =====
  
To remove ''spyder v. 2.1.11'' open a console and enter
+
Spyder ('''S'''cientific '''PY'''thon '''D'''evelopment '''E'''nvi'''R'''onment) is an IDE similar to the one you get with Matlab or Octave. This means you get an editor, a console, online help, variable explorer and much more. With ''Python(x,y) 2.7.3.1'' you get
 +
''Spyder v. 2.1.11''. We recommend however to upgrade to the newest version.
 +
 
 +
First you have to remove the old one first.
  
 
<source lang='DOS'>
 
<source lang='DOS'>
Line 55: Line 58:
 
</source>
 
</source>
  
and then install the newest ''spyder'' (at the time of writing this: v. 2.2.0rc) with
+
and then install the newest ''Spyder'' (at the time of writing this: v. 2.2.0rc) with
  
 
<source lang='DOS'>
 
<source lang='DOS'>
Line 61: Line 64:
 
</source>
 
</source>
  
Maybe you also want to run
+
===== NumPy =====
  
<source lang='DOS'>
+
['''Num'''erical '''Py'''thon]
pip install --upgrade numpy
+
</source>
+
  
<source lang='DOS'>
+
[http://docs.scipy.org/doc/numpy/reference/ NumPy Reference Documentation]
pip install --upgrade scipy
+
 
</source>
+
[http://sourceforge.net/projects/numpy/files/ Download NumPy]
 +
 
 +
===== SciPy =====
 +
 
 +
[http://www.scipy.org/ '''Sci'''entific Library for '''Py'''thon]
 +
 
 +
[http://docs.scipy.org/doc/scipy/reference/ SciPy Reference Documentation]
 +
 
 +
[http://sourceforge.net/projects/scipy/files/ Download SciPy]
 +
 
 +
===== Matplotlib =====
  
and install the newest version (v1.2.1 is not recommended) of [http://matplotlib.org/downloads.html matplotlib]
+
Install the newest version (v1.2.1 is not recommended) of [http://matplotlib.org/downloads.html matplotlib]
  
 
[[Category:Install]]
 
[[Category:Install]]

Revision as of 21:29, 20 April 2013

Contents

Python can be used to achieve results similar to Octave or Matlab, but with the advantages of a fundamentally object-oriented general-purpose language. Additionally to numerical computation, packages allow to solve linear systems.

Numerical computation with Python mainly bases on the following libraries:

  • NumPy for arrays, linear algebra, ...
  • SciPy depends on NumPy, used to manipulate numbers, for signal processing, ...
  • matplotlib for 2D plots

PyLab integrates these 3 libraries.

The Spyder IDE provides a MATLAB-like development interface. As a simple alternative, IPython provides a web-based GUI and Mathematica-like notebooks.

Installation

Mac OS

Donload Spyder. Copy the application to the Applications folder.

Launch Spyder, and in the console type:

t = linspace(0, 10, 100);
plot(t, sin(t));

Linux

Installation can be done on a package basis, with pip. An alternative would be easy_install.

Install the IDE:

sudo apt-get install spyder

This also installs numPy, sciPy and matplotlib.

Launch Spyder, and in the console type:

t = linspace(0, 10, 100);
plot(t, sin(t));

Windows

Download Python(x,y) to install Python and other components of your choice.

Python(x,y) 2.7.3.1

During the installation make sure to have pip selected in the list of available Python modules.

Spyder IDE

Spyder (Scientific PYthon Development EnviRonment) is an IDE similar to the one you get with Matlab or Octave. This means you get an editor, a console, online help, variable explorer and much more. With Python(x,y) 2.7.3.1 you get Spyder v. 2.1.11. We recommend however to upgrade to the newest version.

First you have to remove the old one first.

pip uninstall spyder

and then install the newest Spyder (at the time of writing this: v. 2.2.0rc) with

pip install spyder
NumPy

[Numerical Python]

NumPy Reference Documentation

Download NumPy

SciPy

Scientific Library for Python

SciPy Reference Documentation

Download SciPy

Matplotlib

Install the newest version (v1.2.1 is not recommended) of matplotlib

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox