Configuring Python for use with an on-premise Robots Agent
Note
Applies only to organizations that use an on-premise Robots Agent to run ACL scripts in ACL robots.
Individuals and organizations with ACL Robotics Professional Edition do not have an on-premise Robots Agent.
These configuration instructions refer to a customer-installed instance of Python required to use ACLScript Python functions. This instance of Python is not the same as the instance of Python that can be installed as part of the Robots Agent installation to support machine learning commands.
Neither of the two locally installed instances of Python can be used for Python/HCL scripting in HighBond robots or Workflow robots. Python/HCL scripting in Diligent One is strictly cloud-based and cannot be accessed locally.
To configure Python to work with the Robots Agent, you must install a compatible version of Python and add the Python executable to the server's PATH environment variable. After you install PYTHON, set the ACLPYTHONDLL and PYTHONPATH system environment variables.
How it works
To run Python scripts, the Robots Agent must be able to call the Python executable and find the scripts it is instructed to run. The Robots Agent uses the PATH environment variable to locate Python and the PYTHONPATH environment variable to locate scripts.
Install Python (32-bit)
- From the Python downloads page, download one of the following versions of Python to your computer or the server:
- 3.7.x
- 3.8.x
- 3.9.x
Note
The listed versions of Python have been tested and verified to work with Analytics or the Robots Agent.
Any version of Python from 3.7.x onward should work. However, versions other than those listed are not guaranteed to work.
- On your computer or the server, double-click the installer.
- In the installer, select Add Python versionNumber to PATH.
- Click Install and follow the on-screen instructions.
- Reboot the computer or the server before running any Python scripts called by an Analytics script.
Set the ACLPYTHONDLL and PYTHONPATH environment variables
- In the C:\ drive of the operating system, create one or more folders to house your Python scripts.
Example C:\python_scripts
- From the operating system, open the System Properties dialog box and click Environment Variables.
- In the System variables section, click New and enter the following variables:
Variable name Variable value PYTHONPATH The full path to the folder(s) you created to house the Python scripts. Separate multiple folder paths with a semi-colon.
Example:
C:\python_scripts;C:\dev;C:\tmp
ACLPYTHONDLL The full path and filename of the Python DLL file in the Python installation folder.
Example:
c:\python_install\python35.dll
Note
Upon installation, Python adds the DLL to the system folder (c:\windows\system32\python35.dll) rather than the installation folder. You must copy the DLL from the system folder to the installation folder, and use the installation folder location as the variable value. Analytics or the Robots Agent look for the DLL in the Python installation folder.
You may also need to remove any read-only settings from the installation folder.
- To save the variable, click OK and then in the System Properties dialog box, click OK.