Page MenuHome

Use 'PyPreConfig' for initialization (Python 3.8)
Open, Confirmed, LowPublic


Python 3.8 has a more convenient way to setup the interpreter. See:

This mostly applies to BPY_python_start in bpy_interface.c.

While it's currently working the code is full of workarounds,
we had quite some issues with this in the past:

  • Having to use environment variables that can fail depending on how Python is linked.
  • Issues with sys.argv encoding.
  • Issues with sys.stdout/stderr encoding.

For Blender, we could use this to:

  • Python home.
  • Program name.
  • System argument list.
  • Default encoding.

Using this gives us more control over the Python environment without workarounds.

So I think we could move to using this once we move to Python 3.8.


To Do

Related Objects