Skip to content

Instantly share code, notes, and snippets.

@fxadecimal
Last active September 20, 2023 15:27
Show Gist options
  • Save fxadecimal/bf469e15b3cbb1adcc66fba17df6e424 to your computer and use it in GitHub Desktop.
Save fxadecimal/bf469e15b3cbb1adcc66fba17df6e424 to your computer and use it in GitHub Desktop.
Attempting to install the SysML2.0 Extension in Jupyter

SysML 2.0 with Jupyter

Install On Windows

Install Using Mamba

# Optional: Install Git
winget install -e --id Git.Git

# Clone repo
git clone https://github.com/Systems-Modeling/SysML-v2-Release

# install Mamba Forge using winget
winget install -e --id CondaForge.Mambaforge

# activate base mamba virtual env
"C:\Users\<user>\mambaforge\condabin\activate.bat"

# install jupyter et. al
mamba install -y -v python=3.* 
mamba install -y -v jupyterlab=2.* graphviz=2.* nodejs=14.*
mamba install -y -v jupyter-sysml-kernel=0.35.0

# install python sysml install script
python install.py

# run jupyter
jupyter lab

Install Using Conda

# Optional: Windows Terminal
winget install -e --id Microsoft.WindowsTerminal

# Git
winget install -e --id Git.Git

# openJDK 17
winget install Microsoft.OpenJDK.17

# miniconda3
winget install -e --id Anaconda.Miniconda3

# install jupyter
conda install jupyter

Setup SysML

# clone the repo (you may need to open the git bash prompt)
git clone https://github.com/Systems-Modeling/SysML-v2-Release

# drop into the install directory
cd SysML-v2-Release\install\jupyter

# run the installer
install.bat

# run jupyter lab
jupyter lab

Manual Install using Conda

#####
# If install.bat fails:

conda update -n base -c defaults conda
conda config --set channel_priority strict # limit "Solving environment" spinner
conda update conda
conda install python=3.* jupyterlab=2.* graphviz=2.* nodejs=14.* -c conda-forge -y
conda install jupyter-sysml-kernel=0.35.0 -c conda-forge -y
jupyter labextension uninstall @systems-modeling/jupyterlab-sysml
jupyter labextension install "@systems-modeling/jupyterlab-sysml@%SYSML_VERSION%" || goto:error
python .\install.py

# run jupyter lab
jupyter lab

# Error "TypeError: warn() missing 1 required keyword-only argument: 'stacklevel'" 
pip uninstall traitlets
pip install traitlets==5.9.0
jupyter lab



# Ubuntu 22.04 install

```sh


sudo apt-get update
sudo apt-get install git
sudo apt-get install openjdk-21-jdk

# install miniconda
mkdir -p ~/miniconda3
cd ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
#rm -rf ~/miniconda3/miniconda.sh

# add conda to ~/.bashrc 
~/miniconda3/bin/conda init bash

# reload ~/.bashrc
source ~/.bashrc


# install sysml plugin
git clone https://github.com/Systems-Modeling/SysML-v2-Release
cd SysML-v2-Release/install/jupyter/
. ./install.sh

Manual Install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment