Getting started

Python Install


Is is strongly advised to install Python by using Anaconda:

  • Ready to go Python, with the main libraries installed (Numpy, Scipy, Matplotlib)

  • Possibility to create multiple environments with different versions of Python and packages (conda).

In practice:

  • Download the distribution corresponding to your system (cf. Download)

  • Install it in a place where you have read and write access.

Running Python

Python console

To run Python in normal mode, type in a terminal:


Interactive Python console

To run Python in interactive mode, type in a terminal:


Spyder (IDE)

To run the Python IDE, type in a terminal:

spyder &

Jupyter Notebook

To run the Jupyter Notebook, type in a terminal:

jupyter notebook &

Running scripts

Open a text editor and type in:

import sys

# my first program (comment)
print('hello ', sys.argv)

Save as

Running using python

From the terminal type:

python arg1 arg2 arg3

You should see:

hello  ['', 'arg1', 'arg2', 'arg3']
Note: The sys.argv statements returns the list of arguments, with the 1st element the name of the script.

Running using ipython

Open ipython from the terminal, then type:

run arg1 arg2 arg3

To check the environment, type whos. You should see:

In [2]: whos
Variable   Type      Data/Info
sys        module    <module 'sys' (built-in)>

Running from Spyder

Open spyder, open the file and click on the Run -> Configuration per file menu. Add arguments to the program as follows:


Then, click on the Run file button to run all the program or the Run selection button to run the current line

Run file button:


Run selection button: