Setup
Requirements
Python 3 is required. While the package is importable in Python 3.5, some functionality may not be available there. The first supported Python version is 3.6. On Windows systems prebuilt binaries are available for the official Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12 releases.
The Python API wraps the low-level C API, and the source code of the wrapper is also available. This allows users to build their own binaries of the Python extension on Linux/macOS, as well as on Windows if they use a non-standard Python ABI.
Preparing the installation
Note
The following steps are mandatory.
In order to save space in the fluxEngine package, the DLLs associated with fluxEngine are only included once in the package. For the Python programs to work, the DLLs must first be copied into the Python directory structure.
A script is provided as part of the fluxEngine package. Call the script on Windows platforms via:
C:\...\fluxEngine\python> python prepare.py
or on non-Windows platforms via:
/.../fluxEngine/python$ python3 prepare.py
This will ensure that the source package is complete. On Windows
systems it will also recreate precompiled binary packages that may be
installed via pip
(see below).
Using Pre-Compiled Windows Binaries
Precompiled binaries are provided for the official Python installer
versions, for Python versions 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, and
3.12. They are distributed in form of Wheel packages that may be
installed via the pip
package manager.
To install the package, ensure that the wheel
package is available
in your Python installation, and on a command prompt run the command
pip install precompiled\filename.whl
Please select the correct filename according to the Python version you have installed.
Note
Important: the package also contains directories with the name
.whl_contents
. Do not specify one of these directories,
they exist only so that prepare.py
(see above) can recreate the
.whl
files!
Building the Python API Extension from Source
A compiler compatible with the one that created the Python executable
must be installed. The following packages are required, and may be
installed and made sure they are up to date via pip
:
pip3 install wheel numpy
pip3 install -U setuptools
(On some systems, this might just be pip
instead of pip3
.)
To create the wrapper, one should open a command line in the
source
directory of the wrapper and call the following:
python3 setup.py bdist_wheel
(On some systems, this might just be python
instead of
python3
.)
This will create a subdirectory dist
that contains a Python wheel
package with the .whl
extension. That package may be installed via
pip
:
pip3 install dist/filename.whl
Note: the Python wrapper source contains only the source code for the Python extension; fluxEngine itself and its dependencies are solely provided in binary form.