Set up your home computer#

You need to have Python 3, not Python 2. First of all, a computer or laptop is needed, not a tablet or any other mobile tech. Many computers have Python 3 already installed locally on it; if yours does not, please follow the next instructions.

“Python 3” installation and configuration#

Installation#

Download and install the last “stable release” for your Operative System (3.*.*) from https://www.python.org/downloads/. I suggest you to take a look to the site (python.org). It is worth it!

  • Windows

  • MacOs

  • Linux: Python 3 comes preinstalled on most Linux distributions. You will need to install “python3” and “idle”. Let me know if you have any difficulty setting it up.

Finally, to test that Python 3 is well installed, run your first program following the next.

Create a working folder#

Create a folder within the Desktop using your favorite file manager. In that folder you are going to store/save all your programs. It will be very useful, whenever you need to check your old programs and ideas, you know now where to look for them. Use pBioYourName as folder name. For instance, pBioMargaretDayhoff (with no whitespace) if you are Margaret Dayhoff.

Edit and Run your own code#

Use the program “IDLE”#

This program is associated to the version of Python (any 3.* will do it) that you have just installed in your computer:

Windows

MacOs

Then,

  1. Open the “IDLE” App: now you see a Python interpreter. Check that you are using Python 3. In the interpreter you can run Python commands. For instance, the classical Hello world:

You can try more commands, like arithmetic operations; but, at the moment you can not edit and save your own programs. For that, do the next:

  1. Write your program in a file (using IDLE):

    • Select “File” and the tab “New File” (or “Open…” an existing file)

    • Write your program (for instance, type the previous Hello world line of code, without the “>>>”)

    • Save it in your working folder (ie. pBioMargaretDayhoff). Python scripts have the extension .py, for instance first_program.py

  2. Run your program: Select “Run” and “Run Module”, or simply with F5. The results can be seen in the Python interpreter


An alternative#

It is very easy to use a Jupyter notebook from a JGU-server. Feel free to use whatever you want, but be ready to to run Python from your local computer (home and presential).