-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
"#!/usr/bin/env python" doesn't work on Ubuntu 18.04 / python3 #5369
Comments
This isn't a bug it's env specific issue. We can start discussing deprecating support for python2 but that's a different discussion. |
Actually, I believe the shebang lines in these python source files are spurious, since they do not have the eXecute bit set anyway:
Shebangs are only needed if you If it's true, then I think it would be good idea to remove all the shebang lines to avoid confusion. |
The related script is updated as: exec python3 ${TRINO_HOME}/bin/launcher.py --etc-dir ${PULSAR_TRINO_CONF} "${@}" ... so that I think this issue should be resolved. |
Describe the bug
Ubuntu 18.04 comes with python3 only by default, so scripts which try to start "python" don't work.
To Reproduce
On Ubuntu 18.04, try to start the sql worker:
Tracing shows that sql-worker runs
lib/presto/bin/launcher
which runslib/presto/bin/launcher.py
whose first line is#!/usr/bin/env python
The underlying problem is: Ubuntu 18.04 comes with python3 only by default. In the case of Ubuntu (and presumably Debian), "python" means python2, which is very shortly end-of-life.
Symlinking python3 to python is heavily discouraged, as it can badly break things which depend on python2.
It's not clear whether sql worker is compatible with python3 or not, but a workaround is to patch the files:
Expected behavior
sql worker should start
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: