Set up your JGU-presential-computer#

“Python 3” installation and configuration#

Installation#

In your ZDV-apps page add:

  • Python

  • Notepad++: it is an editor and it is possible that you do not end up using this one, but just in case, install it!

After login again in the computer, the ZDV-apps will be setup and you can now edit and run your own Python programs. Be sure, that you are connected to internet through a LAN cable, because some ZDV programs do not work properly using wifi.

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 “IDLE V5” App#

  1. Open the “IDLE V5” App: in the Python interpreter you can run Python 3 commands. For instance, try with the classic

>>>print("Hello world")

Some simple arithmetic operations will do it too. But, wait! You can not edit, save and run long programs (scripts).

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

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

    • Write your Python program there

    • Save it in your working folder (pBioMargaretDayhoff). Your Python’s file will have the extension .py (ie. first_program.py).

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

That’s all! You are ready to go. Do not forget to setup your home computer to study and prepare the exam and to be familiar with the Jupyter notebook.


Main alternative (presential)#

Using a Jupyter notebook from a JGU server#

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).


Other alternatives#

If you are a newcomer, you do not need these ones, but anyway I will provide them

You can also use google colab servers#

You can use Google Jupyter-notebook servers. They are for free at the moment and have many possibilities: https://colab.research.google.com/

Running code in your terminal/cmd (presential)#

  1. Open a terminal/cmd. In JGU-computers, instead of looking for “cmd”, search for “Python cmd.exe V5”. It is weird from my perspective, at home you can simply open a terminal (cmd for Windows users)

  2. Edit your program using a plain-text editor (ie. Notebook ++). It is important to use a plain-text editor and not something else, like MS-Windows. Save your code in your working directory (pBioMargaretDayhoff), in a file with the extension .py (ie. test.py)

  3. In the terminal go to your working directory:

    • “cd Desktop”, and “cd pBioMargaretDayhoff” (without quotes, of course)

  4. Run your code. In the terminal/cmd, in your working directory

    • “python3 test.py” (without quotes). Note that in presential-JGU-computers you have to use “python test.py” instead


Last but not least!#

Do not forget to be familiar with the Jupyter notebook and to setup your home computer to study and prepare the exam.