Prerequisites
Version 25.2.9314
Version 25.2.9314
Prerequisites
To write and execute Python within CData Arc, you must install some platform-specific dependencies on the server hosting Arc. The prerequisites vary depending on whether you are running Arc in a Java or .NET environment.
Java
To enable Python support on Java, install the following dependencies:
- Python 3: Download the latest version from the Python website.
- Java Embedded Python (Jep) version 4.2.2
Installing Jep for Java
Jep is a library that allows you to embed the Python interpreter into Java applications. It enables two-way integration between Java and Python, which lets Java programs run Python code, share variables, and even call functions across languages.
You can find Jep and installation instructions on the Jep GitHub page.
Note: Before you can install Jep, you need to install pip
.
- For Debian/Ubuntu-based distributions,
pip
can typically be installed using the following command:sudo apt-get install python3-pip
. - For other distributions, refer to the appropriate documentation for
pip
installation.
Once Python and pip
are installed, install Jep using this command: python3 -m pip install jep==4.2.2
.NET
To enable Python support on .NET, install the following dependencies:
- Python 3: Download the latest version from the Python website.
- Python.NET (
pythonnet
) version 3.0.5
Installing Python.NET
Python.NET (pythonnet
) is a bridge between Python and .NET. It allows Python code to interact directly with .NET assemblies, and enables .NET applications to run and interact with Python scripts, all within the same process. See the pythonnet GitHub page for more information.
Use the following pip
command to install pythonnet
: pip install pythonnet
Configure Your Environment
The final prerequisite step is to set a system environment variable that enables Arc to find your Python installation.
Set the PYTHONHOME
environment variable to the root directory of your Python installation. This tells Arc where to find the Python interpreter on your system.