Installing Python: Difference between revisions

From Wiki Cours
Jump to navigation Jump to search
(Created page with "You need to install a Python distribution that contains the scientific libraries scipy, numpy and matplotlib. Therefore, you should have a look at the [https://www.scipy.org/i...")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
Therefore, you should have a look at the [https://www.scipy.org/install.html Scipy install] webpage.
Therefore, you should have a look at the [https://www.scipy.org/install.html Scipy install] webpage.


We will try to work with Python 3 codes mostly so it is good for you to have Python 3 installed (there are two versions of Python, Python 2 and Python 3, which are not fully compatible).
We will try to work with '''Python 3''' codes mostly so it is good for you to have Python 3 installed (there are two versions of Python, Python 2 and Python 3, which are not fully compatible).


In order to run scripts, you have several options~:
In order to run scripts, you have several options:
* use the command line and some text editor (mostly Linux and Mac)
* use the command line and some text editor (mostly Linux and Mac)
* use some simple IDE such as Idle (provided by the standard distribution) or Spyder (for windows for instance)
* use some simple IDE such as [https://en.wikipedia.org/wiki/IDLE Idle] (provided by the standard distribution) or [https://en.wikipedia.org/wiki/Spyder_(software) Spyder] (friendly under windows for instance)
* use the IPython notebook called [https://jupyter.org/ Jupyter] (for Windows, Mac and Linux) in which you can write text+formula+code+output, as in Mathematica. The notebook is an option to write your reports for Homeworks, together with the usual TeX+Figures
* use the IPython notebook called [https://jupyter.org/ Jupyter] (for Windows, Mac and Linux) in which you can write text+formula+code+output, as in Mathematica. The notebook is an option to write your reports for Homeworks, together with the usual TeX+Figures


== some distributions ==
== some distributions ==


* under Mac or Linux, installing from packages should be friendly. Installing [https://www.anaconda.com/download/ Anaconda] is also a good option as it contains everything but is heavy.
* under windows, we recommend to install [https://www.anaconda.com/download/ Anaconda], beware that it takes a lot of disk memory (more than a Gbyte). You can select packages.
* under Ubuntu of Linux, an alternative is the lighter version called [[Installing mini-conda]].


== learning Python and Numpy ==


La procédure recommandée est d'utiliser une distribution tout-en-un qui inclut les toutes les bibliothèques utiles au prix d'une certaine occupation du disque.
* for French speaking students, you may have a look at the [[Memento_Python]] and below, as weel as any introductory course.
Consulter le site [https://www.scipy.org/install.html Scipy install] pour plus de précisions.
* for English speaking students, there are many resources throughout the web: possible ones are
* Pour ce cours, nous avons essayé la distribution [http://continuum.io/downloads Anaconda] qui fonctionne bien sur PC individuels mais a posé des problèmes pour les dossiers utilisateurs partagés en réseau.
** [http://www.python-course.eu Python course]
* [http://python-xy.github.io/ Python(x,y)] a mieux fonctionné.
** [http://www.scipy-lectures.org/ Scipy lecture notes]
 
== sous Linux ou Mac OS ==
 
Python est nativement installé. Si besoin, il faut installer IPython et le notebook, ainsi que les bibliothèques scientifiques scipy, numpy, matplotlib.
Consulter le site [https://www.scipy.org/install.html Scipy install] pour plus de précisions.
 
La distribution [https://store.continuum.io/cshop/anaconda/ anaconda] est également disponible sous Linux et Mac OS.
 
Pour en savoir plus:
* [https://github.com/python-prepa/python-prepa/blob/master/preparation/mail_installation.rst Conseils sur l'installation]

Latest revision as of 15:58, 11 September 2018

You need to install a Python distribution that contains the scientific libraries scipy, numpy and matplotlib. Therefore, you should have a look at the Scipy install webpage.

We will try to work with Python 3 codes mostly so it is good for you to have Python 3 installed (there are two versions of Python, Python 2 and Python 3, which are not fully compatible).

In order to run scripts, you have several options:

  • use the command line and some text editor (mostly Linux and Mac)
  • use some simple IDE such as Idle (provided by the standard distribution) or Spyder (friendly under windows for instance)
  • use the IPython notebook called Jupyter (for Windows, Mac and Linux) in which you can write text+formula+code+output, as in Mathematica. The notebook is an option to write your reports for Homeworks, together with the usual TeX+Figures

some distributions

  • under Mac or Linux, installing from packages should be friendly. Installing Anaconda is also a good option as it contains everything but is heavy.
  • under windows, we recommend to install Anaconda, beware that it takes a lot of disk memory (more than a Gbyte). You can select packages.
  • under Ubuntu of Linux, an alternative is the lighter version called Installing mini-conda.

learning Python and Numpy

  • for French speaking students, you may have a look at the Memento_Python and below, as weel as any introductory course.
  • for English speaking students, there are many resources throughout the web: possible ones are