Lumu Custom integrations are designed to run on multiple platforms by using:
Python 3.10 or above or
A Docker container.
This article will focus on the environment setup using Python 3.10 or above.
As a recommended practice, we encourage you to create a Virtual environment for each integration to avoid conflicts between them and your operating system tools. You can deploy Python on different operating systems. Here, you will find specific instructions on how to prepare your integration environment before deploying any of them.
Most of the current Linux distributions come with Python preinstalled. You can check if your distribution has the required Python version by running this command on a console.
If you get a version 3.10 or above, you can start from the Install venv or pip header. Otherwise, please follow these instructions.
Simple Python Version Management (pyenv) lets you manage multiple versions of Python in a single environment. If you just try to update your current System Python’s version, you will have unexpected results. So, it’s recommended to manage multiple versions.
Follow the instructions according to your Linux distribution.
It you are running a Ubuntu/Debian environment, run the following command on a console:
It you are running a Fedora/CentOS/RHEL environment, run the following command on a console:
It you are running a Fedora/CentOS/RHEL environment, run the following command on a console:
To install pyenv, you must use the pyenv-installer. Run this command on a console:
You will get an output like the following.
Follow the on-screen instructions. Finally, reload your shell.
Now you can install the required Python version. Run this command on a console.
You will get the following output.
You must download and install the required Python version from the Python official website. It’s recommended to download the latest release of Python 3.10 or above.
Run the installer and follow the on-screen instructions.
For custom installations, you must select the pip option. This is required for managing packages and dependencies required by each integration.
You need venv and pip packages to create Python virtual environments. According to your Operating System, you must follow a different set of instructions.
You need to install the python3-env package to be able to create Python virtual environments. Use your distro package manager to install it.
These requirements are already installed if you followed the instructions starting from the Prepare Python on your environment for Windows systems header.
After installing Python, you can create your virtual environment. According to your environment and how you set up Python, you must follow one of the following.
If you did not install a different version of Python in your environment by following the pyenv instructions, you can create your Virtual environment by using the following command:
Where ENV_FOLDER must be replaced by the name you want to give to your Python virtual environment. We recommend using venv or .venv.
If you installed a new Python version for running your integrations, run the following command on your device console to create your Python virtua environment.
Where ENV_FOLDER must be replaced by the name you want to give to your Python virtual environment. We recommend using venv or .venv.
The process to create a Python virtual environment is similar to other operating systems. Open a command prompt and run the following command.
Where ENV_FOLDER must be replaced by the name you want to give to your Python virtual environment. We recommend using venv or .venv.