Configuring Python for use with AX Server

To configure Python to work with AX Server, you must install the correct version of Python and add the Python executable to your system PATH environment variable. After you install PYTHON, set the ACLPYTHONDLL and PYTHONPATH system environment variables on each machine that hosts an instance of AX Server or AX Engine Node.

How it works

To run Python scripts, Analytics Exchange must be able to call the Python executable and find the scripts it is instructed to run. AX Server uses the PATH environment variable to locate Python and the PYTHONPATH environment variable to locate scripts.

Install Python version 3.5.x (32-bit)

Note

You must complete these steps on every machine that hosts an instance of AX Server or AX Engine Node.

  1. From the Python downloads page, download the latest version of Python 3.5 to your machine.
  2. On your machine, double-click the installer.
  3. In the installer, select Add Python versionNumber to PATH.
  4. Click Install and follow the on-screen instructions.
  5. Reboot the machine before running any Python scripts from ACL.

Set the ACLPYTHONDLL and PYTHONPATH environment variables

Note

You must complete these steps on every machine that hosts an instance of AX Server or AX Engine Node. The user account that runs the Analytics Exchange Service must have permission to access the folder(s) in your PYTHONPATH environment variable.

  1. In your Windows operating system, create one or more folders to house your Python scripts.

    ExampleC:\python_scripts.

  2. From your Windows operating system, open the System Properties dialog box and click Environment Variables.
  3. In the System variables section, click New and enter the following variables:
    Variable nameVariable valueExample
    PYTHONPATH The full path to the folder(s) you created to house the Python scripts. Separate multiple folder paths with a semi-colon.C:\python_scripts;C:\dev;C:\tmp
    ACLPYTHONDLL

    The full path and filename of the Python DLL file in the Python installation folder that you want to use with ACL.

    If you are using Python 3.3.x, the following restrictions apply:

    • Unicode characters are not supported in the path for European platforms
    • Extended characters are not supported in the path for Asian platforms

    Note

    Python adds the DLL to the system folder (c:\windows\system32\python33.dll) rather than the installation folder. You must copy the DLL from the system folder to the installation folder, and use this as the variable value so that ACL can access the DLL.

    You may also need to remove any read only settings from the installation folder.

    If you do not set this value, ACL attempts to use the default supported version 3.5.x DLL python35.dll.

    c:\python_install\python33.dll
  4. To save the variable, click OK and then in the System Properties dialog box, click OK.

(C) ACL Services Ltd. All Rights Reserved.

Saturday, April 20, 2019