Author Topic: import substance_painter into python3 terminal  (Read 1470 times)


Is there any way to configure the environment such that substance_painter can be imported into a python3 terminal (I am on linux if it matters).  I am hoping there is a way to export textures without running a display.

This is the error I am currently getting:

Code: [Select]
Python 3.7.6 (default, Feb 19 2020, 13:29:31)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import substance_painter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/path/to/substance_painter/6.2.1/resources/python/modules/substance_painter/", line 25, in <module>
    from substance_painter import (display, event, exception, export, logging, project, resource,
  File "/path/to/substance_painter/6.2.1/resources/python/modules/substance_painter/", line 50, in <module>
    import _substance_painter.display
ModuleNotFoundError: No module named '_substance_painter'


I'm also really interested in using the painter python module outside of painter itself.

Is there any other way of doing this, i'm getting the same issue.  :(

Hi guys,

we do not provide a separate SDK for substance painter so you can't use the substance_painter module outside of Painter.
Senior Software Engineer
Substance Painter Team