I’m trying to use Python on in my Unreal Engine project using UnrealEnginePython. However, when I try to load my project and build the plugin, it throws
ERROR: Unable to instantiate module 'UnrealEnginePython': System.Exception: Unable to find Python includes, please add a search path to linuxKnownIncludesPaths. How can I fix this?
As part of UnrealEnginePython’s build process, it goes through a set list of paths in search of the host machine’s Python install location. Because not all machines will be setup the same, it’s possible that your Python install location will be in a location not currently listed. If you’re seeing this error, then that’s probably the case.
To fix this, you can go to the file where these locations are listed
UnrealEnginePython.Build.cs and modify the
pythonHome variable with your machine’s Python install location (see the line on GitHub).
Find your Python install location by typing into the terminal:
python import sys sys.executable
This will print out the install location of your system’s Python.
Navigate to the
UnrealEnginePython.Build.cs file located in your projects Plugins folder like
pythonHome variable to point to your Python install location.
Hi I'm Hamilton and I wrote / built this! I like doing lots of things, but mostly I like to build (and then share those buildings). Some things I'm currently building: art, software, and prose. To stay up-to-date with my latest buildings, subscribe to my email list or follow one of my many other accounts. #buildit #shipit #justhamit