Setup on Windows

The following instructions guide through the setup of Python and PyRolL on Windows. The setup of Python is explained, since we recommend specific settings in the Python setup to avoid issues in use. The following instructions are known to work on Windows 10 and 11, but shall also work on earlier versions if supported Python versions are available for the respective platform.

Python

Download the Windows Python Installer from the Python website. Currently, version 3.11 is recommended for use with PyRolL. You may use this link for download.

Run the installer and make sure, that you check and uncheck the options as in the images below.

We want to make Python available from the command line, so check the PATH option. But we also want to customize further things, so proceed with the customized installation.

Windows Python Setup Window 1

For installing PyRolL we definitely need pip. The py launcher makes it easier to run scripts directly.

Windows Python Setup Window 2

We want a per-user installation, since a system-wide installation would need admin privileges when installing packages through pip. Again make sure to check the shortcut and the PATH option to make Python and packages available on the terminal. Check, that the installation directory is in AppData\Local, which means the per-user installation.

Windows Python Setup Window 3

When clicking install the installation starts. Wait until it’s finished and quit the installer. Then proceed with the PyRolL installation.

PyRolL

You have the choice of a global or a local installation of PyRolL. Global means, that you have one version of PyRolL installed available and used in all your simulation projects. A local installation is only used in one simulation project and is not available outside the project. We recommend to not mix both concepts, since that can lead to obscure version conflicts and hard to find errors. We generally recommend a local installation, since this enables you to reproduce the results of a simulation at a later point, because the simulation is run every time with the same version of PyRolL and plugins installed, no mater if there have been updates since the last time. Also, you are able to use multiple versions of PyRolL in parallel without any conflicts.

Global Installation

Open a terminal by right-clicking on the start button and choosing Terminal. On some versions this is also called Command Line or Command Prompt. On recent Windows versions you can also use Power Shell. A black or blue Window is opened with a command prompt, were we can type the commands for installation of PyRolL. If a command fails with error like “… is not recognized as an operable programm, script or function”, a reboot of the computer is probably necessary.

Install PyRolL Core using pip with the following command. This installs the most recent version of PyRolL. Other packages for PyRolL can be installed the same way by typing the respective package name instead of pyroll-core as listed on PyPI or the plugins and extensions lists.

pip install pyroll-core

Local Installation

For the local installation we need first a project directory. Create a new empty directory in your desired location and open it in Explorer. Then, open a terminal in this directory. On Windows 8/10 do this by clicking on the File menu in Explorer and choosing Open PowerShell or Open Command Promp. On Windows 11 this is possible by right-clicking into the file list and choosing Open Terminal.

First we must create a local virtual Python environment were we can install our packages into. We recommend pipenv for this. Install pipenv to your global Python installation with

pip install pipenv

Then you can install PyRolL Core locally with the following command. Pipenv will automatically create a local virtual environment and the necessary configuration files. You will notice the local environment by the Pipfile and Pipfile.lock files, which are just textfiles listing your packages and some metadata.

pipenv install pyroll-core

The content of the Pipfile shall be something like below. You see the pyroll-core package listed. The star represents that no version constraint was given.

[packages]
pyroll-core = "*"

[dev-packages]

[requires]
python_version = "3.9"

You can now activate the environment in your terminal by typing

pipenv shell