8.6.2. Compiling Python From SourceΒΆ
Note
It is recommended to use the Python packages supplied by your GNU/Linux distribution if possible.
On some GNU/Linux distributions there may be no pre-packaged Python package available that meets our version requirements, or the pre-packaged Python might not be sufficient for various reasons, e.g. because it omits various modules that are expected by the Axivion Suite or by your scripts. In these cases, it is usually best, to download the Python source code and compile it manually.
You can get the gzipped or XZ compressed source tarball from the official site https://www.python.org/ .
In order to successfully build, installation of various dependencies may be necessary depending on your actual distribution and already installed packages. Typical build dependency package names on Debian-based distributions for example include zlib1g-dev, libffi-dev, libsqlite3-dev, libssl-dev, etc. The configure script usually gives useful hints on what dependencies are missing.
After unpacking and installation of dependencies, the compilation process is invoked like this
./configure --enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --enable-optimizations
make
make test
sudo make install
The source tarball itself contains extensive documentation on various build-options
that can be specified when invoking ./configure, e.g. --prefix when
choosing a different installation directory.
The switch --enable-optimizations is optional. It makes the build much slower
but later pays off in better analysis execution speed.
Note
You may also want to consider Using uv managed Python instead.