There are several packages for installing Python, IPython, NumPy, Matplotlib, and SciPy together. I prefer Anaconda (the Python 3 version), which comes with Jupyter notebooks, BioPython, and the Spyder development environment. An alternative is the Enthought Python distribution.
There are multiple options for programming Python. We will typically use IPython, which can be accessed in diverse ways:
Using a Jupyter notebook: a good choice because your assignments must be performed in a Jupyter notebook. To open a notebook, type
jupyter notebook
in a Terminal, which should cause a web browser to open.
Note that you must simultaneously press shift and return to actually run IPython. There are some useful guides and keyboard shortcuts.
Using the Spyder or PyCharm development environments, which include an editor for writing code and a de-bugger to help fix coding errors.
Open an IPython window and use a stand-alone editor. Possible choices include gedit and notepad++.
To start IPython on a Mac, type
ipython --pylab
On Windows, choose the -qtconsole option from the Anaconda launcher (you may be asked to download this option first).
To check that everything has installed correctly, try:
import matplotlib.pyplot as plt
import numpy as np
plt.plot(np.arange(1,10))
plt.show()
which should generate a plot of a straight-line.
My notes on Python.
All books are available online through the university library:
There are many modules to enable Python to be used in other areas. For example, biopython for bioinformatics, scikit-learn for machine learning and keras and pytorch for neural networks, pandas for data analysis and interacting with spreadsheets such as Excel, scikit-image and opencv for image processing, sage and sympy for computer algebra, and seaborn for beautiful visualization of data.