Installation of pyMANGA

1 Requirements

The software pyMANGA is written in the programming language Python and uses Python libraries. That means, during the installation a local library with different Python modules will be installed on your computer. These modules contain source code that is frequently used by many programmers.

If you are new to programming, it might be convenient to install a user interface, a so-called IDE, to work with Python. Those IDEs make code easier to read and support the installation and management of modules, for example. Our team is happy to use PyCharm and Spyder, respectively. Both IDEs offer a free version.

2 Download pyMANGA

First you need to download the current version of pyMANGA.
You can do this either by cloning the git-repositories (for advanced users) or by following the instructions below.

The current version of pyMANGA can be found on this homepage. Download the source code of the program as shown in Figure 1 as zip file.


Figure 1: You can download pyMANGA from the publicly available git repository.

This zip file must now be unpacked to any location. This example uses the root of your C:\ drive. Make sure that there are no spaces and no umlauts (like ä,ö,ü,ß) in the file path. This folder contains all the program components of pyMANGA, including MANGA.py, which is the execution file that must be called to execute the program. Furthermore, the folder contains a collection of benchmarks.

3 Install Python and Python Modules

In the following, we describe how to install the following software

Because the installation differs between operating systems, please select your operating system below.

Choosing the correct Python version:
pyMANGA is tested with Python 3.7 and Python 3.11.
While current testing indicates that you may be fine using the latest stable release, we recommend using Python 3.11. at this point to avoid any unforeseen version related issues.

3.1 Ubuntu

Installation of Python in Ubuntu

Ubuntu 18.04 includes a first installation of (Python 2 and) Python 3 by default. In order to check which version is currently on the computer, after opening a new terminal window with the key combination “CTRL + Alt + T “, a version query can be started with the command:

python3 -V 

It is recommended to update the package directory of the operating system first. To update the current version, you can use the commands

sudo apt update

and

sudo apt -y upgrade 

to update the whole system - and thus the Python 3 package. The updated version can be checked again via the command

python3 -V

If unexpected problems occur, you can use the command

sudo apt-get install python3

to (re)install the package.

Installation of Python Modules in Ubuntu

In order to run pyMANGA, you may need to install modules that are not yet in the Python library but are required by pyMANGA. Since Python also plays an important role in the Ubuntu operating system, the pre-installed library is very extensive. Therefore, it is recommended to install the program first and to install any missing modules after the first execution of the program - pyMANGA will tell you which modules are needed.

If pyMANGA cannot yet be executed due to missing modules in the local Python library - as mentioned at the beginning - one of the missing packages is displayed in an error message. For the installation of Python modules, pip (“Pip installs Python”) is suitable. By opening a terminal window (key combination Ctrl + Alt + T) and entering the command

sudo apt-get install python3-pip

pip can be installed.

To add a Python module to the library with pip the following command must be entered into a terminal:

pip3 install name_of_the_module

The modules needed to run pyMANGA are listed in the requirements file. Please download the requirements file by clicking the three dots on the right hand side of the github page and select “Download”. To install all modules listed in the requirements file, you can use the following command. Don’t forget to adjust the file to the requirements file according to your download location (e.g. )

pip3 install -r requirements.txt

3.2 Windows

Installation of Python in Windows

To run pyMANGA, you must first obtain an interpreter for the Python programming language. An example would be pythonTM. To do this, open your browser and go to python.org. In the drop-down menu under Download you will find the current release version for your operating system of Python (this manual describes the procedure for Windows, see Figure 2).


Figure 2: Select the python version suitable for Windows on python.org.

Figure 3: Select a stable Python release from the list of available releases. Please note: pyMANGA has only been tested with Python 3.7 and 3.11.

Open the downloaded file (python-3.xx.xx-amd64.exe) and install it on your computer (see Figure 4).


Figure 4: Run the downloaded file and install python by following the instructions.

This completes the Python installation.

Installation of Python Modules in Windows

To install python modules, we use the “Command Prompt”. You can easily find it by typing “Command Prompt” in the windows search window and opening it with a mouse click. Since pyMANGA is a command line program, everything happens in the command prompt (see Figure 5).


Figure 5: Start the command prompt.

Now, we install all python modules that are needed to run pyMANGA. As a reminder, the requirement file lists all modules that we need to install and is included in the pyMANGA folder you downloaded earlier (Download pyMANGA). In the command prompt navigate to your pyMANGA folder by using the cd command. If you saved the file to the root of your C:\ drive you can use the following command to navigate to the folder:

cd C:\pyMANGA

Pip lets us install all modules that are listed in the requirement file with one line of code. This might take a couple minutes. Type or copy the following code into the command prompt to start the installation (see Figure 6).

py -m pip install -r requirements.txt

Figure 6: Install the needed python packages using the command prompt.

Note: If the prompt says that pip is not up-to-date, you can use upgrade pip to update it. However, this is not mandatory.

Now the preparations for using the compiler are finished.

Further explanations
  • cd is short for change directories and is used to navigate to a specific folder.
  • py means you are calling Python. If you have multiple versions of Python installed on your computer, you can use e.g. py -3.7 to call Python 3.7.
  • -m means you are calling a module, in this case pip, which is used to install other modules.
  • The -r flag tells pip to read the requirements file and install all modules listed in it.

4 Install pyMANGA

After you have set up Python on your computer, the next step is to install pyMANGA. The execution of pyMANGA is platform dependent, too.

pyMANGA execution in Ubuntu

Open a terminal window with the key combination Ctrl + Alt + T and navigate to the main level of the program. Alternatively, you can also choose the graphical way by navigating to the location via Files. There you can open the console by right-clicking and in the menu that opens, you have to use the field “Open in Terminal” to open a terminal window, where you are already in the main level of the program.

By typing

python3 MANGA.py -h

the program will be started.

pyMANGA execution in Windows

To execute pyMANGA, open the command prompt again. If you are unsure how to open and use the command prompt, please refer to the instructions in the section Installation of Python Modules in Windows. If you closed the command prompt make sure to navigate to the pyMANGA folder again (e.g. cd C:\pyMANGA).
Now we can run pyMANGA and check the help by typing the following command:

py MANGA.py -h

Again, py means Python is called, MANGA.py represents the file to be called, and the -h flag calls the help. If everything works, pyMANGA provides possible arguments and how to use them to run the program with a project file (Figure 7). In the next section we will explain how to run pyMANGA with a project file.


Figure 7: pyMANGAs console output provides an example how to use the program and how to properly input a project file.

Note: To find your file path, right-click on the pyMANGA folder and go to Properties. Here you will find information about the location of the folder. To access the folder, you have to add the name of the folder (e.g. /pyMANGA) to the file-path.