SpencerPark / IJava

A Jupyter kernel for executing Java code.
MIT License
1.07k stars 211 forks source link

Failed to install #132

Open TDClarke opened 2 years ago

TDClarke commented 2 years ago

Tried installing as per instructions, having previously ran it on another computer using Anaconda.

(base)` C:\Users\Tommie>git clone https://github.com/SpencerPark/IJava.git
Cloning into 'IJava'...
remote: Enumerating objects: 887, done.
remote: Counting objects: 100% (62/62), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 887 (delta 7), reused 45 (delta 5), pack-reused 825R
Receiving objects: 100% (887/887), 485.09 KiB | 4.58 MiB/s, done.
Resolving deltas: 100% (323/323), done.

(base) C:\Users\Tommie>cd IJava/

(base) C:\Users\Tommie\IJava>gradlew installKernel

> Task :buildSrc:compileGroovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/Tommie/.gradle/wrapper/dists/gradle-4.8.1-bin/e8p42vx1m7a3mz9ydmjagn6wn/gradle-4.8.1/lib/groovy-all-2.4.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Failed to execute: python3 --version.
Stdout:

Stderr:
        Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

> Task :compileJava
Note: C:\Users\Tommie\IJava\src\main\java\io\github\spencerpark\ijava\magics\dependencies\Maven.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Failed to execute: python3 --version.
Stdout:

Stderr:
        Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':installKernel'.
> Could not get jupyter data-dir.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 15s
3 actionable tasks: 3 executed

(base) C:\Users\Tommie\IJava>
askua commented 2 years ago

Windows 10 Python 3.7 Java 11.0.14 Gradle 4.8.1

When input command " gradlew installKernel " in cmd, I got error as

<-------------> 0% CONFIGURING [5s] Failed to execute: python3 --version. of :shade Stdout:

Stderr:

Failed to execute: python3 --version. Stdout:

Stderr:

I copy D:\Python37\python.exe to D:\Python37\python3.exe, I success built Ijava kernel

image

FAILURE: Build failed with an exception.

nsankar commented 2 years ago

I also could not install using the gradlew steps. Build fails..

image

askua commented 2 years ago

maybe you should set a proxy for gradlew? you can try. and the gradlew’ version could not too high because the author of the source code repo. There are so many different dependents.

davisjm4 commented 1 year ago

@nsankar I'm having the exact same issue, have you found a solution?

yashj1301 commented 1 year ago

I also could not install using the gradlew steps. Build fails..

image

Same issue here, something to do with gradle ?

askua commented 1 year ago

@nsankar @davisjm4 @yashj1301 @TDClarke Maybe you could set a proxy sever for gradlew tool. like https://michlstechblog.info/blog/gradlew-using-gradlew-behind-a-http-proxy-server/ image

and build again in cmd.

use command line gradlew installkernel --stacktrace --info --python D:\Python37\python3.exe

From the plugin README:

  • Install path configuration:
    • --python PYTHON: Set the python executable to use for resolving the sys.prefix.
  • Install path:
    • --default: Install for all users.
    • --user: Install to the per-user kernel registry.
    • --sys-prefix: Install to Python's sys.prefix. Useful in conda/virtual environments.
    • --prefix PREFIX: Specify a prefix to install to, e.g. an env. The kernelspec will be installed in PREFIX/share/jupyter/kernels/.
    • --path PATH: Set the path to install the kernel to. The install directory is $path/$kernelName.
    • --legacy: Install to $HOME/.ipython. Not recommended but available if needed.

For example if your python installation is called python3.7, use ./gradlew installKernel --python python3.7. image

hekailiang commented 6 months ago

may lated to jdk version, jdk 11 works, but 17 failed due to unsupported gradle version