Setup
You don’t need python installed on your system, as Unreal Python is embedded into Unreal.
Unreal Version | Python Version |
---|---|
4.27 | 3.7.7 |
5.0 | 3.9.7 |
UE Python Plugin
In the UE Editor, we need to enable the python plugin.
- Edit > Plugins > Enable “Python Editor Script Plugin” (you’ll need to restart the UE editor)
- Window > Developer tools > Output Log
- Bottom Left of the Output Log, switch it from Cmd to Python
VS Code Autocomplete
First you will need enable to developer mode from the Editor:
- Edit > Project Settings > Plugins > Python > Enable “Developer Mode” and restart the editor.
- An unreal.py file will be created in
PROJECT/Intermediate/PythonStub/unreal.py
- In VS Code: File > Preferences > Settings > Extensions > Python > Edit in settings.json
- Add the following .extraPaths to the VS Code settings.json
{
...
"python.autoComplete.extraPaths": [
["C:\\path\\to\\PROJECT\\Intermediate\\PythonStub"]
]
"python.analysis.extraPaths": [
["C:\\path\\to\\PROJECT\\Intermediate\\PythonStub"]
]
}
After this, VS code should have access to the python stub.

References
- Getting started with Python in UE4 by Sondre Utheim
https://sondreutheim.com/post/getting_started_with_python_in_ue4 - Setting up Autocomplete for Editor Python Scripting
https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/ScriptingAndAutomation/Python/Autocomplete/ - Unreal Python API