Sistemas Multimedia- Study Guide - Milestone 2: Installation and basic programming with Python

Vicente González Ruiz - Depto Informática - UAL

January 7, 2021

1 Description

The PRMC project are a collection of Python modules written in Python [3]. Therefore, you will need an interpreter and know how to develop/run Python programs (modules and packages).

Most of the current Unix-based operating systems (Linux, FreeBSD and OSX) use Python for running some of their “daily tasks”, which means that a Python interpreter is already available. However, usually it is better to use our own interpreter because:

  1. We can chose the version of Python and the packages.
  2. We can optimize the compilation of the interpreter depending on our needs (for example, including Tk support or not).
  3. By default, all the Python packages will be installed in a different repository of the system packages, which eases the system/user Python-isolation and the removal of the interpreter.

In Windows you need to install Python, yes or yes, from the official website. However, notice that this “guide” only contemplates the installation of Python in Unix-based OS machines.

2 What you have to do?

  1. Installation of Python.

    1. Go to YAPT/01-hello_world/02-installation.ipynb [2] and follow the instructions to install CPython 3.8.5, and create a new virtual environment called tm. Basically:
               sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
               curl | bash
               cat << EOF >> ~/.bashrh
               export PATH="$HOME/.pyenv/bin:$PATH"
               eval "$(pyenv init -)"
               source ~/.bashrc
               pyenv install -v 3.8.5
               pyenv virtualenv 3.8.5 tm

    2. Remember that you will need to active it when you want to work in this project:
           pyenv activate tm

      It is a good idea to append this to the ~/.bashrc file.

    3. Install an IDE for programming with Python. I recommend Thonny if you are not used to any other.
           pip install thonny
  2. Python programming.

    1. You don’t need to master Python to follow this course, but it is convenient for you to follow some Python programming tutorial, such as The Python Tutorial [1] if you realize that the language is a setback for you. If you need to start with Python from scratch, an introduction to Python such as this workshop of YAPT [2] could also be helpful. See also ZetCode’s Python Tutorial.

3 Timming

This milestone should be done before the next class.

4 Deliverables


5 Resources

[1]   The Python Tutorial.

[2]   YAPT.

[3]   Python website.