Systems-Modeling / SysML-v2-Release

The latest incremental release of SysML v2. Start here.
GNU Lesser General Public License v3.0
416 stars 56 forks source link

jupyter kernel not functional following install instructions on Linux #40

Open jbohren opened 2 years ago

jbohren commented 2 years ago

Summary

Install of jupyter SysMLv2 pilot on Ubuntu 20.04 following instructions does not result in functioning kernel.

Context

Expected Behavior

After following install instructions , jupyter lab should present a functional SysML kernel.

Observed Behavior

After following install instructions , jupyter lab does not present a functional SysML kernel.

Workaround

Pass 1

The kernel is installed to conda, but not available to jupyter, so it can be installed:

jupyter kernelspec install --user ~/miniconda3/pkgs/jupyter-sysml-kernel-0.17.0-pyhd8ed1ab_0/share/jupyter/kernels/sysml

This makes the kernel available, but upon execution, the following error occurs:

Error: Unable to access jarfile /home/conda/feedstock_root/build_artifacts/jupyter-sysml-kernel_1636760614547/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/share/jupyter/kernels/sysml/jupyter-sysml-kernel-0.17.0-SNAPSHOT-all.jar

Pass 2

After uninstalling the kernel from jupyter, locate the occurrences of the above invalid jarfile path, and replace it with the correct one in the installation.

Reinstall the kernel to jupyter (jupyter kernelspec install).

Kernel is now available and fully functional.

Comments

It's not clear to me if this is an issue with the conda distribution or the install process. Either way, the above workaround is definitely a hack.

Also, this effort to make the SysMLv2 spec and pilot implementations so accessible is awesome!

seidewitz commented 2 years ago

@ivan-gomes: Can you address this?

EricBurgers63 commented 1 year ago

problem still exists, running the default install.sh shows this on a clean install of linux mint 20.3

--- Step 1: Testing Conda installation ---
/home/xxxxxxxxx/miniconda3/bin/conda
conda 4.12.0
--- Step 2: Testing Java installation ---
/usr/bin/java
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)
--- Step 3: Installing Jupyter SysML kernel and dependencies ---
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: | Killed

Stangely enough,installation succeeded when i first installed jupyter using:

conda install -c anaconda jupyter

TomTravis commented 1 year ago

well this failed last attempt

I installed this ARM64 and work great Python 3.10.6 install Debian 11 https://github.com/conda-forge/miniforge.git Screenshot_2022-11-10_15-06-16 Screenshot_2022-11-10_15-05-49 Jupyter and eclipse now is update just fine

SebastianGrau commented 1 year ago

I have the same problem with the error

Error: Unable to access jarfile /home/conda/feedstock_root/build_artifacts/jupyter-sysml-kernel_1678763576168/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/share/jupyter/kernels/sysml/jupyter-sysml-kernel-0.33.0-all.jar

System:

The solution proposed by @jbohren worked out for me but it was quite a hassle. Actually I was looking forward to being an early adopter of SysML v2 and use the jupyter lab extension in the courses I teach on satellite system design. But I don't see how I will get my students to set up the kernel spec properly this way.

dean-neumann-wisi commented 6 months ago

the same problem still exists on Windows 10 in the SysML-v2-Release-2024-01 release. After installing with SysML-v2-Release-2024-01/install/jupyter/install.bat : First, jupyter lab launches with no SysML kernel appearing in launcher, then after manually installing the sysml kernel as described in Pass1 above, I get the same "unable to access jarfile" described above:

[I 08:38:57.457 LabApp] Build is up to date
[I 08:39:07.087 LabApp] Creating new notebook in
[I 08:39:07.848 LabApp] Kernel started: 921da9f6-0e41-412b-b38a-372c0238ae90, name: sysml
Error: Unable to access jarfile /home/conda/feedstock_root/build_artifacts/jupyter-sysml-kernel_1707195201317/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho
ld_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/share/jupyter/kernels/sysml/jupyter-sysml-kernel-0.38.0-all.jar
mike-mbse-dev commented 1 month ago

About the jarfile issue in windows, you need to modify the -jar arg (line 5) on jupyter/kernels/sysml/kernel.json so that points to the right directory where the kernel is actually installed. It is highly dislikely that in a windows environment you will find a home dir (linux), I do not know if the subdir _h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho ld_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ does actually anything but in my case I had to replace it with a regular windows dirpath that did actually exist in the system.

In my case the kernel runs fine after applying the installation mentioned in step 1 in this issue thread and modifying the kernel.json file imagen imagen