-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make GUI installs more robust and provide helpful messages #269
base: mainline
Are you sure you want to change the base?
Conversation
9816a1e
to
acb37b7
Compare
acb37b7
to
c8de8dd
Compare
if "ModuleNotFoundError: No module named 'encodings'".lower() in result.stderr.lower(): | ||
# Occurred on deadline 0.46 - this seemed to happen when running on linux using /usr/bin/python3, | ||
# could not reproduce when built on the same machine the install fails on. | ||
# Debug info DOES indicate it's /usr/bin/python3 running and not happening within | ||
# the deadline executable. Running the command manually also appears to work fine | ||
click.echo("Unable to install GUI dependencies, you can fix this by running:") | ||
click.echo() | ||
click.echo(f"\t{printed_command}") | ||
click.echo() | ||
sys.exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this happens because pyinstaller's bootstrapping sets some env vars that get inherited and picked up by the subprocess. In fact, it sounds a lot like this topic in their docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great find! I'll look into applying the reversion of the environment changes
Signed-off-by: Morgan Epp <[email protected]>
Signed-off-by: Morgan Epp <[email protected]> Co-authored-by: Josh Usiskin <[email protected]> Co-authored-by: Charles Moore <[email protected]>
1d58c25
to
6f09548
Compare
What was the problem/requirement? (What/Why)
We've been encountering some edge-cases with the lazy installs of pyside on both Windows and Linux.
Failures we aren't fixing in here:
On Linux:
The QApplication is aborting, thus we can't catch this and provide helpful advice. The message isn't too bad, and there's lots of posts online. A user must install xcb-cursors as appropriate on their linux distro. The submitter installer may be able to bundle this in the future, but pypi users will need to do this regardless.
What was the solution? (How)
I've moved all the installation logic to an internal
_ensure_pyside
function that adds checks for all these different scenarios. If the executable appears to be a microsoft store executable, we add the--no-user
flag so that we can install to a targetWhat is the impact of this change?
Users should hopefully be able to help themselves get the GUI components onto their machine!
How was this change tested?
On Linux:
Running that command with
sudo
allowed me to launch the deadline guiOn Windows:
running that command as Admin allowed me to install the dependencies, and then I was able to launch the gui as the original user.
after installing python from the windows store, I was able to re-run the command use the GUI
Was this change documented?
For the most part it is documentation.
Is this a breaking change?
Fixing!
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.