-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5rgjpuri0d8.html
More file actions
1 lines (1 loc) · 4.29 KB
/
5rgjpuri0d8.html
File metadata and controls
1 lines (1 loc) · 4.29 KB
1
<div>Two of the most popular distributions and installers are from <a href="https://www.anaconda.com/download/" target="_blank">Anaconda </a> and <a href="https://www.enthought.com/product/canopy/" target="_blank">Enthought</a>. Both are freely available for Mac OS, Linux, and Windows . Either should do what you need. That said, the examples presented below for installation of additional Python packages assume the use of <a href="https://www.anaconda.com/download/" target="_blank">Anaconda Navigator</a>. </div><div>Also, if you are using this for a Smith Physics course, we ask you to use Anaconda Navigator if you wish us to be able to provide support with installation and programming (since that is what we are using). </div><div></div><h3 data-label="541387" class="ltx_title_subsubsection">Installing Anaconda Navigator</h3><div></div><div>Download the latest version of <a href="https://www.anaconda.com/download/" target="_blank">Anaconda Navigator</a> here. Be sure to chose the Python 3.x version of Python (and not the older version 2.7), as all of the examples provided here assume the use of Python 3. After installation, restart and launch the Anaconda Navigator app. You should then be able to launch a Jupyter notebook from either the graphical interface or environments tab (see Figure <span class="au-ref raw v1">\ref{231311}</span>) to be officially off and running. </div><div></div><div>OK, you also need to install some supplementary packages if you want to be able to do calculations that include units and/or uncertainties. But it isn't difficult within Anaconda to do that. See section <span class="au-ref raw v1">\ref{273995}</span> below. </div><div></div><h3 data-label="731142" class="ltx_title_subsubsection">Building your own distribution</h3><div></div><div>Still prefer to build your own clean, lean, and mean Python installation and willing to blaze (and maintain) your own trail ? Here's <a href="http://www-personal.umich.edu/~mejn/cp/chapters/AppendixA.pdf" target="_blank">a guide to getting started</a> that results in an exceptionally lean installation suitable for use in computational physics. If you want to run the example code provided here on your own computer, however, you will also want to install the <a href="https://ipython.org/" target="_blank">iPython</a>, <a href="https://jupyter.org/" target="_blank">Jupyter</a>, and <a href="https://www.scipy.org/scipylib/index.html" target="_blank">Scipy</a> packages (at a minimum). Other packages may be needed as well; one tried and true but tedious way to do this is to attempt to run the code and then let the computer tell you what you are missing! </div><div></div><div> Finally, if you are an experienced and independent-minded Python programmer (and would you have read the previous paragraph if you weren't?), you may ask, "Why Jupyter?" Why not use the Python or iPython command line directly, use a bare-bones editor such as IDLE , or a more comprehensive MATLAB like programming environment like Spyder? If you are in one of our Smith Physics courses, the answer is because we use Jupyter notebooks not only to run Python code but also to generate a partially "self-documenting" electronic lab notebook as we do so. If you are doing a lot of programming requiring extensive re-writing and debugging, you may prefer to first work in development environment like Spyder, then run the finished product within Jupyter to generate a notebook version of the data analysis, but in experimental physics, you still need to keep an comprehensive electronic notebook of your instrument setup, measurement, and data analysis steps! Finally, note that the command line is convenient for quick calculations and tests of code but is inadequate for serious editing and debugging, and does not provide a reproducible record of your results. As a calculator it is great but as a notebook it is not! There's really no good reason as an experimental physicist with a computer at your disposal not to use an electronic notebook instead of a calculator in the first place. Get with the program! :) </div><div></div><h2 data-label="140511" class="ltx_title_subsection">Using the Anaconda installer</h2>