Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with installation in ubuntu 20.04 #21

Open
pablo-angulo opened this issue Feb 23, 2021 · 1 comment
Open

Help with installation in ubuntu 20.04 #21

pablo-angulo opened this issue Feb 23, 2021 · 1 comment

Comments

@pablo-angulo
Copy link

I can't install jupyter-openmodelica in ubuntu 20.04. The kernel does not appear in the list or in jupyter kernelspec list

  • There is no kernel.json file, which I have used to install other jupyter kernels.
  • You mention that I should set the OPENMODELICAHOME variable, but I don't know what value should it take after an openmodelica installation from the official repositories.

Regards

@Dan-Cornelius-Maxim
Copy link

Hi @pablo-angulo,

I´ve just installed jupyter-openmodelica in ubuntu 23.10 and using it with visual studio code.

1. OpenModelica installation

First I´ve installed OpenModelica by using the commands from this page (https://openmodelica.org/download/download-linux/)

a)
sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo curl -fsSL http://build.openmodelica.org/apt/openmodelica.asc | \ sudo gpg --dearmor -o /usr/share/keyrings/openmodelica-keyring.gpg

b)
Note that I use the nightly version
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] \ https://build.openmodelica.org/apt \ $(cat /etc/os-release | grep "\(UBUNTU\\|DEBIAN\\|VERSION\)_CODENAME" | sort | cut -d= -f 2 | head -1) \ nightly" | sudo tee /etc/apt/sources.list.d/openmodelica.list

c)
Update your system and install full version or minimal version with sudo apt install --no-install-recommends omc
sudo apt update sudo apt install openmodelica

2. OMPython installation

sudo apt install python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip

3. jupyter-openmodelica installation

pip install ipython
pip install ipykernel
python3 -m pip install https://github.com/OpenModelica/jupyter-openmodelica/archive/master.zip

Now you should be ready for using OpenModelica-Kernel in JupyterNotebook.

I just create a file with .ipynb extension with vscode and open it. Then I choose the OpenModelica as kernel and the cells can be used for Modelica Code and with commands from the OpenModelica Scripting API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants