This is an old revision of the document!
Installing Python Modules
ARDI itself and many of its addons use Python, and will require extra modules to provide extra features and functionality.
If you're [addons:installing|installing addons manually]] or your migrating between servers, you'll probably also need to install one or more Python modules.
With An Internet Connection
If your ARDI server is connected to the Internet, you can run the pip command to directly download and install any required modules.
In a terminal or command-line, type the following…
Windows:
C:\python314\scripts\pip install <packagename>
Linux:
pip3 install <packagename>
In cases where you are installing into a version of Python managed by another package management system (such as apt on Ubuntu/Debian linux installations), you might need to either install from your package manager, or add the parameter '–break-system-packages' to the PIP command-line.
Without an Internet Connection
If your server can not connect to the Internet, you can do this in two distinct steps.
Step 1: Download Packages
Firstly, install Python on a PC that has a connection to the Internet and run the same command shown above, but this time using download rather than install.
For example, to download the library for OPC-UA, you'd type…
pip3 download opcua
pip3 download opcua
This will download either .whl or .tar.gz files to the current directory.
Step 2: Copy Packages to Server
Next, transfer those files to the target ARDI server through whatever method works best for your security infrastructure (FTP, Windows File Sharing, USB stick, etc.)
Step 3: Install Packages
Finally, run the same installation command - but add the following parameters - replacing '[download_folder]' with the name of the folder where you've downloaded the package files and '[package_name]' with the name of the packages you want to install.
pip3 --no-index --find-links=[download_folder] [package_name]
Getting a List Of All Required Packages
If you've recently migrated servers or changed Python versions, you might want to download the full set of required modules.
In the ARDI web interface, sign in as an administrator, click on the build-number of ARDI in the lower-right corner, and click Python Libraries.
Here you'll be able to download a requirements.txt file.
Then you can use the '-r' parameter followed by the path to the file - the PIP tool will read all of the package names and install them.
pip3 install -r requirements.txt