Tools/Python Tools
m (→Linux) |
(→Linux) |
||
Line 15: | Line 15: | ||
== Installation == | == Installation == | ||
+ | |||
+ | === Mac OS === | ||
+ | |||
+ | Donload [https://code.google.com/p/spyderlib/downloads/list Spyder]. | ||
+ | Copy the application to the <code>Applications</code> folder. | ||
+ | |||
+ | Launch <code>Spyder</code>, and in the console type: | ||
+ | t = linspace(0, 10, 100); | ||
+ | plot(t, sin(t)); | ||
=== Linux === | === Linux === |
Revision as of 08:01, 4 April 2013
|
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).
This will allow to install Python and other components of your choice.