UE_PYTHON_DIR does not work for an external python installation on Linux (Ubuntu 18.04)

Hi,

Looking at the source, I can see why. The bundled python source directory structure is modified from original . If that is the expected behavior than it would be nice to document it.

It’s assumed that python include files are in UE_PYTHON_DIR/include. That isn’t the case with default python directory structure. The include/python3.7 is the correct directory. A better way is to call python-config --includes to get a list of include directories.

Additionally, it’s assumed similarly for the libpython to be inside the UE_PYTHON_DIR/lib, again that is incorrect. A better way is to call python-config --libs or even better, python-config --ldflags

I thought that the Linux support for Unreal python scripting was still missing. When i tried it around 4.20 there were fragments of code, but the net of it was that it didn’t work. Has this changed?

Don’t know the official stance however it does work for me with 4.22 on Ubuntu. Barring that it still uses Python 2.7 (which is close to the end of it’s lifeline).