Page - 211 - in Programming for Computations β Python - A Gentle Introduction to Numerical Simulations with Python
Image of the Page - 211 -
Text of the Page - 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/
back to the
book Programming for Computations β Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations β Python
A Gentle Introduction to Numerical Simulations with Python
- Title
- Programming for Computations β Python
- Subtitle
- A Gentle Introduction to Numerical Simulations with Python
- Authors
- Svein Linge
- Hans Petter Langtangen
- Publisher
- Springer Open
- Date
- 2016
- Language
- English
- License
- CC BY-NC 4.0
- ISBN
- 978-3-319-32428-9
- Size
- 17.8 x 25.4 cm
- Pages
- 248
- Keywords
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Category
- Informatik