1

I am working on getting the Ganymede kernel installed in my Jupyter environment. Followed the instructions from the docs. Mine is an M1 Macbook pro.

when I execute the following command:

$ java -jar ganymede-2.1.2.20230910.jar -i

I get:

ERROR [    main] Install                                  : Cannot run program "/usr/bin/env bash": error=2, No such file or directory
java.io.IOException: Cannot run program "/usr/bin/env bash": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at ganymede.install.Install.getOutputAsString(Install.java:288)
    at ganymede.install.Install.run(Install.java:177)
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:759)
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:749)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
    at ganymede.Launcher.run(Launcher.java:92)
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:759)
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:749)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
    at ganymede.Launcher.main(Launcher.java:60)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 13 common frames omitted

Any workaround to get this working?

5
  • /usr/bin/env is the program name; bash is an argument to it, not part of its name. Find whatever is trying to run env bash as a single word and fix that thing. Commented Sep 11, 2023 at 14:50
  • To be very clear, MacOS does ship both /usr/bin/env and bash, so as long as you have a normal PATH, the code works just fine when it's correctly interpreted as two separate arguments; the issue is whatever's misusing ProcessBuilder, treating both words as if they were part of the executable name, whereas only the first one is in fact such a name. Commented Sep 11, 2023 at 14:51
  • Think about filing a bug report at github.com/allen-ball/ganymede -- the author is in a position to fix this; we aren't. (We can help you fix it, if you want to get into ganymede's source code, but if you aren't willing to do that you're interacting as a user rather than as a developer, and Stack Overflow isn't really the right place) Commented Sep 11, 2023 at 14:53
  • ...also, reading the source to github.com/allen-ball/ganymede/blob/…, I see they've got a which function defined. You don't need /usr/bin/env when you have which, as you can just do a PATH lookup directly yourself. Commented Sep 11, 2023 at 14:56
  • (...what's really weird is that from the code on github -- if you're running a binary that genuinely corresponds to the source that's published -- the line in question should be running python3, not running /usr/bin/env bash at all -- but this is something that a debugger is probably the best way to investigate) Commented Sep 11, 2023 at 14:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.