Fusion not finding Python3 when launching from Ayon (Linux)

Hi Everyone!
Rocky linux 9.x
When I launch Fusion from a terminal, python3 is working. But when I try to launch from Ayon, python3 is not being found.

Since Python is found and works when launched directly, I believe Python is installed properly. But something is making Ayon unhappy.

There are a few older posts that were somewhat similar in the forums from 2024, but nothing that seems to help. Any ideas?

What’s the full path to the actual python executable it’s using?
Can you try printing this in Py3 in Fusion (without AYON):

import os
print(os.__file__)

It should print the path to the os package for the python being used. It’s more helpful than sys.executable because that return the fusion executable. Anyway, is the os pakage path inside the Python folder you expected it to be? Or is Fusion loading it from elsewhere? Pretty sure it tends to take it from /opt/ something something by default? (Try using that folder instead?)


I think another approach here is actually to do less and allow it. If you’re in a place where you can fully manage that the right Python is available to Fusion out of the box, then the FUSION_PYTHON3_HOME could essentially be avoided.

There is a caveat however that the Fusion integration currently does not allow to ‘disable’ that out of the box (so would need code changes) and there’s other logic that somewhat relies on the FUSION_PYTHON3_HOME to be set, like the auto-install PySide prelaunch hook. However, it may be argued that in a production environment where you’re managing Python environments anyway the install prelaunch hook wouldn’t really be needed either.

From inside of a Fusion launched from terminal, I get the following

image
I tried setting the FUSION_PYTHON3_HOME to
/usr/lib64/python3.9 which didn’t help.

We are not locked to this 3.9 version of Python at this point. What else can I try?

You might be better asking around on the WeSuckLess forums or the Blackmagic Design forums on what’s needed on Linux to point FUSION_PYTHON3_HOME to your /usr/lib64/python3.9

Here are some topics:

What I’d suggest at least is fiddling with FUSION_PYTHON3_HOME env var without AYON involved - just to ensure it’s not AYON doing something else and getting in the way there.

According to this old release notes from BMD:

If set, the PYTHONHOME environment variable (or the explicit PYTHON3HOME and PYTHON2HOME if you have both installed) will be considered. To explicitly override the version used by DaVinci Resolve and Fusion Studio, you can set FUSION_Python3_Home (formerly FUSION_Python36_Home) to point to the base folder.

I wonder if it may also be worth giving e.g. PYTHON3HOME a shot. Anyway, give it a whirl outside of AYON - and try those forums.

The only other approach is to tweak the prelaunch hooks to completely skip working with AYON setting any Python 3 home variables, etc. - so that in your case you can just rely on Fusion’s default behavior of picking whatever it happens to find. Which one may argue could be more dangerous in a real-life production scenario.