Seite - 211 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Bild der Seite - 211 -
Text der Seite - 211 -
A.2 AnacondaandSpyder 211
A.2 AnacondaandSpyder
Anaconda14 is a free Python distribution produced by ContinuumAnalytics and
containsabout200Pythonpackages,aswellasPythonitself, fordoingawiderange
ofscientificcomputations.Anacondacanbedownloadedfromhttp://continuum.io/
downloads.ChoosePythonversion2.7.
The IntegratedDevelopmentEnvironment (IDE) Spyder is includedwithAna-
conda and is our recommended tool forwriting and running Python programs on
Mac andWindows, unless you have preference for a plain text editor forwriting
programsanda terminalwindowfor running them.
A.2.1 SpyderonMac
Spyder is started by typingspyder in a (new)Terminal application. If youget an
errormessageunknownlocale, youneed to type the following line in theTerminal
application, or preferably put the line in your$HOME/.bashrcUnix initialization
file:
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
A.2.2 InstallationofAdditionalPackages
Anacondainstalls thepip tool that ishandyto install additionalpackages. InaTer-
minal applicationonMacor inaPowerShell terminalonWindows,write
Terminal
pip install --user packagename
A.3 HowtoWriteandRunaPythonProgram
Youhavebasically threechoices todevelopand test aPythonprogram:
1. usea text editoranda terminalwindow
2. use an IntegratedDevelopment Environment (IDE), like Spyder, which offers
awindowwith a text editor and functionality to run programs andobserve the
output
3. use the IPythonnotebook
The IPythonnotebook is brieflydescried inSect.A.5,while the other twooptions
areoutlinedbelow.
14https://store.continuum.io/cshop/anaconda/
Programming for Computations – Python
A Gentle Introduction to Numerical Simulations with Python
- Titel
- Programming for Computations – Python
- Untertitel
- A Gentle Introduction to Numerical Simulations with Python
- Autoren
- Svein Linge
- Hans Petter Langtangen
- Verlag
- Springer Open
- Datum
- 2016
- Sprache
- englisch
- Lizenz
- CC BY-NC 4.0
- ISBN
- 978-3-319-32428-9
- Abmessungen
- 17.8 x 25.4 cm
- Seiten
- 248
- Schlagwörter
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Kategorie
- Informatik