Davinci Resolve / Linux / Python-Errors

Hey everyone,
thanks diving more and more into the possibilities with Ayon but sadly I am completely stuck/lost when integrating Davinci Resolve 19 into the pipeline.

Everytime I start Davinci Resolve through Ayon Launcher Python is not found.
When directly launched with /opt/resolve/bin/resolve python is available.

Maybe you can help me out there.

I am running an Ubuntu 24.04 Distro - Python 3.12.9
DavinciResolve Addon Version 0.4.0
Ayon Launcher is starting normally.

At first I tried to just create an venv (no conda) with python 3.9 -same error.

I made a tiny wrapper script for /opt/resolve/start_resolve.sh

#!/bin/bash

# Ensure conda is available in the PATH
#source /home/hartmut/miniconda3/etc/profile.d/conda.sh

# Activate the desired Conda environment
#conda activate resolve_ayon

conda run -n resolve_ayon dgpu-run /opt/resolve/bin/resolve

Resolve is not respecting PYTHONHOME

(resolve_ayon) hartmut@tuxedo-os:~/Downloads/AYON-1.1.1-linux-rocky9$ ./ayon 
/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/dependencies/blessed/terminal.py:183: UserWarning: Failed to setupterm(kind='xterm-256color'): setupterm: could not find terminal
  warnings.warn(msg)
>>> Connected to AYON server https://ayon.hartmut-noerenberg.com
*** AYON [1.1.1] ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>> Using AYON from [ /home/hartmut/Downloads/AYON-1.1.1-linux-rocky9 ]
... AYON variant: [ production ]
... AYON bundle:  [ AllUpdated-2025-03-09-01 ]
>>> loading environments ...
  - global AYON ...
  - for addons ...
!!! ERR: 2025-03-14 22:24:35,210 >>> { ftrack }: [  ftrack URL is not set!  ] 
Registered font families: Noto Sans, Noto Sans, Noto Sans, Noto Sans, Noto Sans Mono, Noto Sans Mono Light, Noto Sans Mono, Noto Sans Mono ExtraLight, Noto Sans Mono, Noto Sans Mono SemiBold, Noto Sans Mono, Noto Sans Mono Black, Noto Sans Mono, Noto Sans Mono, Noto Sans Mono Thin, Noto Sans Mono, Noto Sans Mono Medium, Noto Sans Mono, Noto Sans Mono, Noto Sans Mono ExtraBold
>>> [  Starting WebServer server  ] 
>>> [  Please sign in to ftrack  ] 
>>> [  Starting SiteSync  ] 
>>> [  USD Binary distribution is disabled.  ] 
----------------+-------+--------------+---------+---------------+---------+------------+-----
Addon name      |Version|Initialization|Tray init|Connect modules|Tray menu|Addons start|Total
----------------+-------+--------------+---------+---------------+---------+------------+-----
applications    |1.0.4  |0.001         |N/A      |0.000          |N/A      |N/A         |0.001
ayon_ocio       |1.1.1  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
ayon_third_party|1.1.3  |0.000         |0.000    |0.000          |0.000    |0.023       |0.023
blender         |0.2.9  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
celaction       |0.2.0  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
cinema4d        |0.1.3  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
clockify        |0.2.2  |0.000         |0.277    |0.000          |0.000    |0.000       |0.277
deadline        |0.5.8  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
equalizer       |0.1.0  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
flame           |1.1.0  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
ftrack          |1.4.1  |0.000         |0.009    |0.000          |0.000    |0.002       |0.011
fusion          |0.3.2  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
hiero           |0.5.1  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
houdini         |0.4.4  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
kitsu           |1.2.5  |0.000         |0.000    |0.000          |0.000    |0.606       |0.606
max             |0.2.8  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
maya            |0.4.4  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
motionbuilder   |0.1.1  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
nuke            |0.3.2  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
openrv          |1.0.1  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
photoshop       |0.2.4  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
premiere        |0.1.0  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
resolve         |0.4.0  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
sitesync        |1.2.3  |0.000         |0.140    |0.000          |0.000    |0.001       |0.141
slack           |1.1.3  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
substancepainter|0.2.4  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
timers_manager  |0.2.0  |0.000         |0.000    |0.000          |0.006    |0.000       |0.006
traypublisher   |0.3.0  |0.000         |0.000    |0.000          |0.000    |0.000       |0.000
tvpaint         |0.3.1  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
unreal          |0.2.8  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
usd             |0.1.3  |0.000         |0.000    |0.000          |0.000    |0.008       |0.008
zbrush          |0.3.0  |0.000         |N/A      |0.000          |N/A      |N/A         |0.000
----------------+-------+--------------+---------+---------------+---------+------------+-----
Total           |(32)   |0.001         |0.426    |0.000          |0.006    |0.640       |1.074

>>> [  SiteSync Started  ] 
>>> [  Will add environments for apps and tools: resolve/stable  ] 
>>> [  Colorspace management is disabled globally.  ] 
>>> [  Current context does not have any workfile yet.  ] 
>>> [  Setting AYON_RESOLVE_STARTUP_SCRIPT to: /home/hartmut/.local/share/AYON/addons/resolve_0.4.0/ayon_resolve/startup.py  ] 
>>> [  setting RESOLVE_SCRIPT_API variable to /opt/resolve/Developer/Scripting  ] 
>>> [  setting RESOLVE_SCRIPT_LIB variable to /opt/resolve/libs/Fusion/fusionscript.so  ] 
>>> [  Path to Resolve Python folder: `/home/hartmut/miniconda3/envs/resolve_ayon/bin`  ] 
>>> [  Adding `/home/hartmut/miniconda3/envs/resolve_ayon/bin` to the PATH variable  ] 
>>> [  Utility Scripts Dir: `['/home/hartmut/.local/share/AYON/addons/resolve_0.4.0/ayon_resolve/utility_scripts']`  ] 
>>> [  Utility Scripts: `{'/home/hartmut/.local/share/AYON/addons/resolve_0.4.0/ayon_resolve/utility_scripts': ['ayon_startup.scriptlib', 'develop', 'AYON__Menu.py']}`  ] 
>>> [  Removing `/opt/resolve/Fusion/Scripts/Comp/AYON__Menu.py`...  ] 
>>> [  Copying `/home/hartmut/.local/share/AYON/addons/resolve_0.4.0/ayon_resolve/utility_scripts/ayon_startup.scriptlib` to `/opt/resolve/Fusion/Scripts/ayon_startup.scriptlib`...  ] 
>>> [  Copying `/home/hartmut/.local/share/AYON/addons/resolve_0.4.0/ayon_resolve/utility_scripts/AYON__Menu.py` to `/opt/resolve/Fusion/Scripts/Comp/AYON__Menu.py`...  ] 
>>> [  Launching "resolve/stable" with args (1): ['/opt/resolve/start_resolve.sh']  ] 
Python path configuration:
  PYTHONHOME = '/home/hartmut/miniconda3/envs/resolve_ayon/bin'
  PYTHONPATH = '/opt/resolve/Developer/Scripting/Modules:/home/hartmut/.local/share/AYON/addons/core_1.1.3/ayon_core/vendor/python:/home/hartmut/.local/share/AYON/addons/core_1.1.3/ayon_core/tools:/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/common:/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/dependencies:/home/hartmut/.local/share/AYON/addons/applications_1.0.4:/home/hartmut/.local/share/AYON/addons/ayon_ocio_1.1.1:/home/hartmut/.local/share/AYON/addons/ayon_third_party_1.1.3:/home/hartmut/.local/share/AYON/addons/blender_0.2.9:/home/hartmut/.local/share/AYON/addons/celaction_0.2.0:/home/hartmut/.local/share/AYON/addons/cinema4d_0.1.3:/home/hartmut/.local/share/AYON/addons/clockify_0.2.2:/home/hartmut/.local/share/AYON/addons/core_1.1.3:/home/hartmut/.local/share/AYON/addons/deadline_0.5.8:/home/hartmut/.local/share/AYON/addons/equalizer_0.1.0:/home/hartmut/.local/share/AYON/addons/flame_1.1.0:/home/hartmut/.local/share/AYON/addons/ftrack_1.4.1:/home/hartmut/.local/share/AYON/addons/fusion_0.3.2:/home/hartmut/.local/share/AYON/addons/hiero_0.5.1:/home/hartmut/.local/share/AYON/addons/houdini_0.4.4:/home/hartmut/.local/share/AYON/addons/kitsu_1.2.5:/home/hartmut/.local/share/AYON/addons/max_0.2.8:/home/hartmut/.local/share/AYON/addons/maya_0.4.4:/home/hartmut/.local/share/AYON/addons/motionbuilder_0.1.1:/home/hartmut/.local/share/AYON/addons/nuke_0.3.2:/home/hartmut/.local/share/AYON/addons/openrv_1.0.1:/home/hartmut/.local/share/AYON/addons/photoshop_0.2.4:/home/hartmut/.local/share/AYON/addons/premiere_0.1.0:/home/hartmut/.local/share/AYON/addons/resolve_0.4.0:/home/hartmut/.local/share/AYON/addons/sitesync_1.2.3:/home/hartmut/.local/share/AYON/addons/slack_1.1.3:/home/hartmut/.local/share/AYON/addons/substancepainter_0.2.4:/home/hartmut/.local/share/AYON/addons/timers_manager_0.2.0:/home/hartmut/.local/share/AYON/addons/traypublisher_0.3.0:/home/hartmut/.local/share/AYON/addons/tvpaint_0.3.1:/home/hartmut/.local/share/AYON/addons/unreal_0.2.8:/home/hartmut/.local/share/AYON/addons/usd_0.1.3:/home/hartmut/.local/share/AYON/addons/zbrush_0.3.0:/home/hartmut/.local/share/AYON/dependency_packages/ayon_2502101346_linux-rocky9.zip/dependencies'
  program name = '/home/hartmut/miniconda3/bin/python'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = '/home/hartmut/miniconda3/envs/resolve_ayon/bin/lib/python3.12'
  sys._base_executable = '/home/hartmut/miniconda3/bin/python'
  sys.base_prefix = '/home/hartmut/miniconda3/envs/resolve_ayon/bin'
  sys.base_exec_prefix = '/home/hartmut/miniconda3/envs/resolve_ayon/bin'
  sys.platlibdir = 'lib'
  sys.executable = '/home/hartmut/miniconda3/bin/python'
  sys.prefix = '/home/hartmut/miniconda3/envs/resolve_ayon/bin'
  sys.exec_prefix = '/home/hartmut/miniconda3/envs/resolve_ayon/bin'
  sys.path = [
    '/opt/resolve/Developer/Scripting/Modules',
    '/home/hartmut/.local/share/AYON/addons/core_1.1.3/ayon_core/vendor/python',
    '/home/hartmut/.local/share/AYON/addons/core_1.1.3/ayon_core/tools',
    '/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/common',
    '/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/dependencies',
    '/home/hartmut/.local/share/AYON/addons/applications_1.0.4',
    '/home/hartmut/.local/share/AYON/addons/ayon_ocio_1.1.1',
    '/home/hartmut/.local/share/AYON/addons/ayon_third_party_1.1.3',
    '/home/hartmut/.local/share/AYON/addons/blender_0.2.9',
    '/home/hartmut/.local/share/AYON/addons/celaction_0.2.0',
    '/home/hartmut/.local/share/AYON/addons/cinema4d_0.1.3',
    '/home/hartmut/.local/share/AYON/addons/clockify_0.2.2',
    '/home/hartmut/.local/share/AYON/addons/core_1.1.3',
    '/home/hartmut/.local/share/AYON/addons/deadline_0.5.8',
    '/home/hartmut/.local/share/AYON/addons/equalizer_0.1.0',
    '/home/hartmut/.local/share/AYON/addons/flame_1.1.0',
    '/home/hartmut/.local/share/AYON/addons/ftrack_1.4.1',
    '/home/hartmut/.local/share/AYON/addons/fusion_0.3.2',
    '/home/hartmut/.local/share/AYON/addons/hiero_0.5.1',
    '/home/hartmut/.local/share/AYON/addons/houdini_0.4.4',
    '/home/hartmut/.local/share/AYON/addons/kitsu_1.2.5',
    '/home/hartmut/.local/share/AYON/addons/max_0.2.8',
    '/home/hartmut/.local/share/AYON/addons/maya_0.4.4',
    '/home/hartmut/.local/share/AYON/addons/motionbuilder_0.1.1',
    '/home/hartmut/.local/share/AYON/addons/nuke_0.3.2',
    '/home/hartmut/.local/share/AYON/addons/openrv_1.0.1',
    '/home/hartmut/.local/share/AYON/addons/photoshop_0.2.4',
    '/home/hartmut/.local/share/AYON/addons/premiere_0.1.0',
    '/home/hartmut/.local/share/AYON/addons/resolve_0.4.0',
    '/home/hartmut/.local/share/AYON/addons/sitesync_1.2.3',
    '/home/hartmut/.local/share/AYON/addons/slack_1.1.3',
    '/home/hartmut/.local/share/AYON/addons/substancepainter_0.2.4',
    '/home/hartmut/.local/share/AYON/addons/timers_manager_0.2.0',
    '/home/hartmut/.local/share/AYON/addons/traypublisher_0.3.0',
    '/home/hartmut/.local/share/AYON/addons/tvpaint_0.3.1',
    '/home/hartmut/.local/share/AYON/addons/unreal_0.2.8',
    '/home/hartmut/.local/share/AYON/addons/usd_0.1.3',
    '/home/hartmut/.local/share/AYON/addons/zbrush_0.3.0',
    '/home/hartmut/.local/share/AYON/dependency_packages/ayon_2502101346_linux-rocky9.zip/dependencies',
    '/home/hartmut/miniconda3/envs/resolve_ayon/bin/lib/python312.zip',
    '/home/hartmut/miniconda3/envs/resolve_ayon/bin/lib/python3.12',
    '/home/hartmut/miniconda3/envs/resolve_ayon/bin/lib/python3.12/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x000072bdd0217600 (most recent call first):
  <no Python frame>
=== Debug Information ===
Python Executable: /home/hartmut/miniconda3/envs/resolve_ayon/bin/python3
Python Version: Python 3.9.21
PYTHONHOME: /home/hartmut/miniconda3/envs/resolve_ayon/bin
PYTHONPATH: /opt/resolve/Developer/Scripting/Modules:/home/hartmut/.local/share/AYON/addons/core_1.1.3/ayon_core/vendor/python:/home/hartmut/.local/share/AYON/addons/core_1.1.3/ayon_core/tools:/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/common:/home/hartmut/Downloads/AYON-1.1.1-linux-rocky9/dependencies:/home/hartmut/.local/share/AYON/addons/applications_1.0.4:/home/hartmut/.local/share/AYON/addons/ayon_ocio_1.1.1:/home/hartmut/.local/share/AYON/addons/ayon_third_party_1.1.3:/home/hartmut/.local/share/AYON/addons/blender_0.2.9:/home/hartmut/.local/share/AYON/addons/celaction_0.2.0:/home/hartmut/.local/share/AYON/addons/cinema4d_0.1.3:/home/hartmut/.local/share/AYON/addons/clockify_0.2.2:/home/hartmut/.local/share/AYON/addons/core_1.1.3:/home/hartmut/.local/share/AYON/addons/deadline_0.5.8:/home/hartmut/.local/share/AYON/addons/equalizer_0.1.0:/home/hartmut/.local/share/AYON/addons/flame_1.1.0:/home/hartmut/.local/share/AYON/addons/ftrack_1.4.1:/home/hartmut/.local/share/AYON/addons/fusion_0.3.2:/home/hartmut/.local/share/AYON/addons/hiero_0.5.1:/home/hartmut/.local/share/AYON/addons/houdini_0.4.4:/home/hartmut/.local/share/AYON/addons/kitsu_1.2.5:/home/hartmut/.local/share/AYON/addons/max_0.2.8:/home/hartmut/.local/share/AYON/addons/maya_0.4.4:/home/hartmut/.local/share/AYON/addons/motionbuilder_0.1.1:/home/hartmut/.local/share/AYON/addons/nuke_0.3.2:/home/hartmut/.local/share/AYON/addons/openrv_1.0.1:/home/hartmut/.local/share/AYON/addons/photoshop_0.2.4:/home/hartmut/.local/share/AYON/addons/premiere_0.1.0:/home/hartmut/.local/share/AYON/addons/resolve_0.4.0:/home/hartmut/.local/share/AYON/addons/sitesync_1.2.3:/home/hartmut/.local/share/AYON/addons/slack_1.1.3:/home/hartmut/.local/share/AYON/addons/substancepainter_0.2.4:/home/hartmut/.local/share/AYON/addons/timers_manager_0.2.0:/home/hartmut/.local/share/AYON/addons/traypublisher_0.3.0:/home/hartmut/.local/share/AYON/addons/tvpaint_0.3.1:/home/hartmut/.local/share/AYON/addons/unreal_0.2.8:/home/hartmut/.local/share/AYON/addons/usd_0.1.3:/home/hartmut/.local/share/AYON/addons/zbrush_0.3.0:/home/hartmut/.local/share/AYON/dependency_packages/ayon_2502101346_linux-rocky9.zip/dependencies
PATH: /home/hartmut/miniconda3/envs/resolve_ayon/bin:/home/hartmut/miniconda3/envs/resolve_ayon/bin:/home/hartmut/miniconda3/condabin:/home/hartmut/miniconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:~/Documents/p4v-2024.3.2672664/bin:~/Documents/p4v-2024.3.2672664/lib
=========================

This is my current setup in Ayon:

  • When starting resolve with conda run -n resolve_ayon dgpu-run /opt/resolve/bin/resolve from bash Resolve is running python3.9 - works
  • when no conda-env is used python3.12 is used in resolve

Thanks for helping out,
Greets!

As a simple mention and then this can be closed.

Simple fix is to compile a fresh 3.10 from source and then use this python version directly. solved my issues.

1 Like