2.4.1. Install or run in the cloud?

The first thing to think about is whether you want to install Python or run it in the cloud.

It is a remarkable fact that in today’s computational environment you do not need to have a copy of Python on your local machine in order to learn (and do) everything required for this course. Having said that I definitely recommend that you install Python if you can afford the disk space., And the distribution that will save you the most trouble for the rest of the semester is the Anaconda distribution discussed below. It is always going be easier (and often faster) to have a local copy of Python and local copies of all the data you will be working with. For example startup will be faster. If you need to answer a simple question about the syntax of some command, there is nothing quite like typing “python” or clicking on a Python icon and typing the command to see what works.

However there are also immense advantages to a functioning cloud set up. For example, it will be easier to follow along with what I’m doing in class if you can follow a link and instantly summon up a running copy of the same notebook I’m lecturing from.

So the ideal recommended state is to be able to do both. In the rest of this section, I will discuss recommendations for installing Python on you local machine.

In Section Running python in the cloud, I’ll discuss the easiest way to run Python, using Google Collab notebooks. Choosing a Python distribution and installing it

The following sections discuss some of your installation options. One of the options is recommended. Unless you really know what you’re doing, you should do that. Choosing a Python distribution (you’re-on-your-own options)

You can choose to install a different distribution or continue with one that is lready installed on your machine. If you do, you will have to install at least the following to complete all the work in this course:

  1. numpy

  2. matplotlib

  3. YAML

  4. NLTK

  5. networkx

  6. pandas

  7. Ipython

If you do opt to install one of the standard Python distributions, make sure you have Python 3.7 or later, but do not use Python 2.X. For those who are used to some Python 2.X and feel a little trepidation about upgrading to Python 3.X, this summary of Python 3 features <https://python-3-for-scientists.readthedocs.io/en/latest/python3_features.html> is extraordinarily useful.

Caution Other Python 3.X distributions that are acceptable:

  • Active State Everything in the standard distribution plus, but does not yet have all the modules we will be using.

  • Carnegie Python Has scipy and numpy.

  • Python.org. Standard distribution. Quite a lot of amazing extras come with the standard Python distribution, but some critical modules we will be using will have to be installed separately. This one definitely not recommended unless you really know what you’re doing.

  • For further pointers to less well-known distributions, look here Same caveats apply. Only experiment with these if you really know what you’re doing.

Stop Installing Python

The exact details of how you install your Python will vary depending on the Python distribution you choose and the operating system on your mcahine (Mac OSX, Windows, or Linux). For Anaconda, details are available on the Anaconda distribution page.