We suggest to use pip package installer and the venv module for installing the package in a lightweight virtual environment. Using Python’s built-in virtual environments is preferable to separate the dependencies for different projects and from the python system install. This avoids compatibility problems and conflicts between modules and packages, which might cause instability and bugs when we use python.
1. Create and activate virtual environment¶
A comprehensive tutorial about Python virtual environments is e.g. RealPython -- Python Virtual Environments: A Primer. The following instructions just outline the idea. The user is kindly asked to consult professional instructions.
Linux¶
For example, create an extra directory (say “/opt/venv”), inside of which we create the desired environment (say “pycraenv”).
mkdir /opt/venvpython3 -m venv /opt/venv/pycraenvsource /opt/venv/pycraenv/bin/activateWindows (PowerShell)¶
For example, create an extra directory (say “C:\Tools\python\venv”), inside of which we create the desired environment (say “pycraenv”).
New-Item -Path 'C:\Tools\python\venv' -ItemType Directorypython -m venv C:\Tools\python\venv\pycraenvSet-ExecutionPolicy -Scope Process -ExecutionPolicy BypassC:\Tools\python\venv\pycraenv\Scripts\Activate.ps12. Make sure pip is up to date¶
pip install --upgrade pip3. Install pycra-tools package¶
pip install pycra-tools