It feels like ShotGrid Desktop should be defaulting to Python3 at this point. Is there a way to set that up other than setting the SHOTGUN_PYTHON_VERSION variable to 3? It’s a little tedious at the moment dealing with remote artists.
I want to live in a Python 3 by default! This is an important thing for me as we have remote artists using their local machines sometimes. For non-technical Mac users, setting an environment variable is a big scary thing to do. There is no dialog to set environment variables like windows, so telling someone to manually create an edit their /etc/launchd.conf is a lot to ask. I would love it if there was a Python 3 default version of ShotGrid Desktop. OR an option to set Python version for specific software.
Have you tried changing
<project_path>/config/core/interpreter_Darwin.cfg? Sounds like it might work. You have to point it to Shotgun’s Python 3 (I think both versions are installed).
Out of curiosity, does setting environment variables in /etc/launchd.conf work in modern versions of macOS? I was under the impression that Apple disabled support for this from Yosemite on. The way I’ve done it is to add a .plist file to /Library/LaunchDaemons for GUI apps and do the same in /etc/profile for Terminal stuff. Granted, this solution is even less acceptable for a non-technical end user.
Yeah I think /etc/launchd.conf is still the only way to set system-wide environment variables on Mac. It’s worked for me on both Catalina and Mojave. I believe you have to open permissions on the file if you want it to be truly system-wide though.
This link will show you how to set Desktop to use python 3 by default: Setting Python 3 for Desktop - SG Developer
And then they pretend Apple is such a simple OS…
Yes, we are all trying to avoid doing this, now. The treatment of Python 3 / 2 should be reversed:
The Default should now be Python 3.
Set SHOTGUN_PYTHON_VERSION=2 in order to revert to Python 2.
Actually I found something in the release notes for SG Desktop.
What is new?
You can choose which version of Python to run Shotgun Desktop under. When running the Advanced Project Setup in Python 3 mode, projects will be configured to use the built-in Python 3 interpreter. Note that once setup, a project configured with Python 3 can still be used by a user running a Python 2 version of Shotgun Desktop and vice-versa.
To select which version of Python to use on startup, set the
SHOTGUN_PYTHON_VERSIONenvironment variable to
So it seems like something is set after the advanced project wizard to launch a project in python 3 mode.