How to create a python3 RV plugin?

Hi,
i am using RV 2022.3.1 and i converted a python 2 plugin to python 3. My problem is it seems like RV is still trying to import my plugin as a python 2 library and is erroring out:

ImportError: No module named foo
ERROR: python module bar could not be imported

it is a python 3 module and that’s why i get the import error.

is there a line on the PACKAGE file to add to declare that this is a python 3 module?

Hi @nicosalto

There’s no such thing as a Python 3 plugin. RV runs totally in Python 2 or totally in Python 3. RV 2022.x should runs in Python 3 by default, unless you have set the RV_PYTHON2 environment variable, and in that case RV will run with the built-in Python 2.

In doubt, you can start the ShotGrid Python console or the py-interp tool to see what is the version RV is running with the currently set environment variables.

Thanks!

1 Like