You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/04/14 18:49:28 UTC
[GitHub] [beam] chamikaramj commented on a diff in pull request #17366: [BEAM-17035] Call python3 directly when it is available.
chamikaramj commented on code in PR #17366:
URL: https://github.com/apache/beam/pull/17366#discussion_r850716094
##########
sdks/java/extensions/python/src/main/java/org/apache/beam/sdk/extensions/python/PythonService.java:
##########
@@ -96,6 +95,18 @@ public AutoCloseable start() throws IOException, InterruptedException {
return p::destroy;
}
+ private String whichPython() {
+ for (String executable : ImmutableList.of("python3", "python")) {
+ try {
+ new ProcessBuilder(executable, "--version").start().waitFor();
+ return executable;
+ } catch (IOException | InterruptedException exn) {
+ // Ignore.
Review Comment:
Will ignore result in a default Python binary being picked ?
--
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.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org