allen-ball / ganymede

The Ganymede Kernel is a Jupyter Notebook Java kernel based on the Java Shell tool, JShell.
Apache License 2.0
61 stars 3 forks source link

error while trying to install ganymede-2.1.1.20221231.jar #9

Closed patelabhilash closed 1 year ago

patelabhilash commented 1 year ago

Hi, My system profile is: windows 11 Python 3.10.7 Tried with and without virtual environment.

java --version openjdk 17.0.3 2022-04-19 OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7) OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)

My understanding is that windows support is missing.

I downloaded the ganymede jar, tried running in local and encountered the following error while running the command: java -jar ganymede-2.1.1.20221231.jar -i

java -jar ganymede-2.1.1.20221231.jar -i ERROR [ main] Install : Cannot run program "which": CreateProcess error=2, The system cannot find the file specified java.io.IOException: Cannot run program "which": CreateProcess error=2, The system cannot find the file specified 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:273) at ganymede.install.Install.which(Install.java:263) at ganymede.install.Install.run(Install.java:134) 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: CreateProcess error=2, The system cannot find the file specified at java.base/java.lang.ProcessImpl.create(Native Method) at java.base/java.lang.ProcessImpl.(ProcessImpl.java:494) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) ... 14 common frames omitted

patelabhilash commented 1 year ago

Work around is go install WSL in windows and install the kernel. it works! sudo apt-get upgrade sudo apt-get update sudo apt install openjdk-17-jre-headless sudo apt install python3 apt install python-is-python3 sudo apt install jupyter-notebook sudo apt install jupyter-client java -jar ganymede-2.1.1.20221231.jar -i

Below commands to install graaVM: sudo apt-get install gcc zlib1g-dev build-essential -y wget https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-x64_bin.tar.gz tar -xvzf graalvm-jdk-17_linux-x64_bin.tar.gz

sudo mv graalvm-jdk-17.0.7+8.1/ /usr/lib/jvm echo 'export PATH=/usr/lib/jvm/graalvm-jdk-17.0.7+8.1/bin:$PATH' >> ~/.bashrc echo 'export JAVA_HOME=/usr/lib/jvm/graalvm-jdk-17.0.7+8.1' >> ~/.bashrc source ~/.bashrc gu install native-image

patelabhilash commented 1 year ago

But I am unable to run %%javascript. Any help? I am getting below error: No javascript REPL available

Running below command and restarting the subsystem will do. gu install js

Finally at a working point. Thanks for a great kernel. Although it would be nicer if it supports windows natively in future.