candlerb opened a new issue #5369: "#!/usr/bin/env python" doesn't work on 
Ubuntu 18.04 / python3
   **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:
   $ bin/pulsar sql-worker run
   /usr/bin/env: ‘python’: No such file or directory
   Tracing shows that sql-worker runs `lib/presto/bin/launcher` which runs 
`lib/presto/bin/` 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:
   sed -i'' -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' $(grep -lR 
'^#!/usr/bin/env python$' .)
   **Expected behavior**
   sql worker should start
   **Desktop (please complete the following information):**
    - OS: Ubuntu 18.04

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to