Setting up Python ================= Check that both pip and at least version 3.6 of Python are installed. QuadlogSCADA and some of the Python modules make use of async/await syntax that earlier versions of Python lack. Select Python Interpreter ------------------------- List and check the current versions of Python installed: .. code:: console $ ls -w40 /usr/bin/python3.* /usr/bin/python3.7 /usr/bin/python3.7-config /usr/bin/python3.7m /usr/bin/python3.7m-config /usr/bin/python3.8 /usr/bin/python3.8-config Select the highest Python version for your system for system default. Set the alternatives as follows and then check. .. code:: console $ update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 $ python --version Python Packages --------------- Install the following Python3 packages. .. code:: console $ apt install python3-dev $ apt install python3-venv $ apt install python3-pip Then upgrade pip to ensure it is te latest version. .. code:: console $ pip3 install -U pip It might be that some additional Python modules need installing, such as `distutils`. .. code:: console $ apt install python3-distutils Package Management Tool ----------------------- Poetry is a dependency management tool for Python and it is used to assist in the management of setting up quadlogSCADA source files. For information on Poetry, visit https://python-poetry.org/docs/ Frst install 'curl' so that Poetry can be downloaded and then installed. .. code:: console $ apt install curl $ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python Once Poetry has completed its installation, a message to set the path to Poetry, by either re-login the user session or to set it by command as below. .. code:: console $ source $HOME/.poetry/env Poetry checks .. code:: console $ poetry config --list cache-dir = "/home/dev/.cache/pypoetry" virtualenvs.create = true virtualenvs.in-project = true virtualenvs.path = "{cache-dir}/virtualenvs" # /home/dev/.cache/pypoetry/virtualenvs set for local virtual environment .. code:: console poetry config virtualenvs.path /home/dev/workspace_python/quadlog-scada --local