On JupyterLab, I would like to make Notebook(.ipynb) for Scilab(.sce) etc

In the attached file JupyterLab,
Notebook (.ipynb) is made for Python (.py).

On JupyterLab like above,
I would like to be able to make Notebook(.ipynb) for Scilab(.sce)
If possible, I would like to be able to use Xcos (.zcos) on JupyterLab.
→ Please tell me how to do the above.

Hello,

There is an (unsupported) experimental Scilab Jupyter kernel there:

S.

Mr. mottelet,

Nice to meet you, my name is protfor.

Thank you for your prompt reply.

I will try it from today!

Best regards

Dear

-I am targeting Ubuntu 22.04lts.
-As a result of installing scilab_kernel, I was able to select Scilab from Python from the column as shown below.
-But it doesn’t work even if it’s about 1+1 calculation…

→ Please tell me how to solve it (eg. change from 22.04lts to 20.04lts etc.)

Did you define SCILAB_EXECUTABLE environment variable ?

Hello mottelet,

Set the Scilab PATH is the solution. But if I run my Scilab Code in Jupyter Notebook, it is launching the Scilab Application and does not execute the command in Jupyter notebook.

SCILAB_EXECUTABLE is set. I used setx in the Windows CMD, because I do not have ADMIN rights

setx SCILAB_EXECUTABLE C:/Scilex.exe
setx PATH “%SCILAB_EXECUTABLE%;%PATH%”

Following test worked: It seems to be that I have some trouble with python.

python -m scilab_kernel.check

This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: Issue 1666807: Incorrect file path reported by inspect.getabsfile() - Python tracker
Scilab kernel v0.9.10
Metakernel v0.29.5
Python v3.11.3 | packaged by Anaconda, Inc. | (main, Apr 19 2023, 23:46:34) [MSC v.1916 64 bit (AMD64)]
Python path: C:\Users\gschmidt\AppData\Local\anaconda3\python.exe

Connecting to Scilab…
Scilab connection established
Scilab version “2023.1.0.1684825887”
scilab-2023.1.0

If I click okay, it will run the Scilab Application

If I click on Run in Jupyter Notebook, it will open my Scilab Application and nothing else is happening

Now it works, apart of plotting. I tried to reset all the path variables

Dear mottelet,

I’m protocol.

In my case, I simply didn’t have scilab itself installed.

Based on the URL below
Install Scilab on Ubuntu
$sudo apt install scilab
did.

As a result of installing scilab, as shown below
scilab works on jupyter!

The Question is,

which SCILAB_EXECUTABLE
C:\Tools\scilab-2023.1.0\bin\WScilex.exe
Value should be set?

I am not able to create a plot

Scilab ‘plot2d’ Funktion in -nogui oder -nwni Modus deaktiviert.

Dear

Premise:
Environment is Ubuntu 22.04lts, Scilab is installed, and Scilab_kernel is installed!

Question:
I’m trying to plot a bode plot in the control domain as shown below, but the problem is that the lines are not drawn on the bode plot;;
→ Please tell me how to solve it, such as adding a package!!

I do not have ADMIN rights on my Windows machine.

How did you set the SCILAB_EXECUTABLE environment variable?

I tried

setx SCILAB_EXECUTABLE “%SCILAB_EXECUTABLE%;C:\Tools\scilab-2023.1.0\bin\Scilex.exe -nwni”

but this is not the right syntax

The only way I get Jupyter Notebook working with Scilab Kernel is

setx SCILAB_EXECUTABLE C:\Tools\scilab-2023.1.0\bin\Scilex.exe

I still have trouble to create any kind of Plot

Hi protfor, have you been able to show XCOS GUI in Jupyter notebook?

Use WScilex-cli.exe instead of Scilex.exe

Thanks, unfortunately now the kernel keeps beeing busy and nothing happens.

I believe it is not woking, because the are limitation in my user rights on the PC. In case i figure out, what is the issue, i let you know.

It worked perfectly on my home pc.

python-installer.exe
pip install scilab_kernel
pip install jupyter
set SCILAB_EXECUTABLE WScilex-cli.exe
set PATH=%PATH%;%PROGRAMFILES%\scilab-2023.1.0\bin\
set PATH=%PATH%;SCILAB_EXECUTABLE

Python functions seamlessly in Jupyter Notebook, while Scilab encounters an issue. The evaluation process appears to be perpetually ongoing, as indicated by the persistent black circle cursor. No error messages are displayed in the Windows 10 x64 command window.

I followed the installation instructions meticulously through the command line. Interestingly, my colleague is not experiencing any problems, while I am unable to execute cell evaluations in Jupyter using the Scilab kernel.

I’m hopeful that someone can provide assistance in resolving this matter.

Here is the sequence of steps I undertook for installation:

  1. Installed Scilab using scilab-2023.1.0.bin.x64.exe
  2. Installed Python using python-installer.exe
  3. Installed Jupyter using “pip install jupyter”
  4. Installed the Scilab kernel for Jupyter using “pip install scilab_kernel”
  5. Set the SCILAB_EXECUTABLE using “setx SCILAB_EXECUTABLE WScilex-cli.exe”
  6. Appended the Scilab binary directory to the PATH using the following commands:
  • “setx PATH %PATH%;%PROGRAMFILES%\scilab-2023.1.0\bin”
  • “setx PATH %PATH%;SCILAB_EXECUTABLE”

Troubleshooting steps undertaken:

  • Checked the Scilab kernel using “python -m scilab_kernel.check”
  • Verified the list of installed kernels using “jupyter kernelspec list”

Versions and outputs:

  • Jupyter version: 1.0.0
  • Scilab kernel version: 0.9.10
  • Python version: 3.10.11

Output of “python -m scilab_kernel.check”:

Scilab kernel version: 0.9.10 Metakernel version: 0.29.5 Python version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] Python path: C:\Users\kwas\AppData\Local\Programs\Python\Python310\python.exe

Establishing a connection to Scilab… Connection with Scilab established Scilab version: “2023.1.0.1684825887” Installed Scilab version: scilab-2023.1.0

Output of “pip show scilab_kernel”:

Name: scilab-kernel Version: 0.9.10 Summary: A Jupyter kernel for Scilab. Home-page: http://github.com/calsto/scilab_kernel License: MIT Location: c:\users\kwas\appdata\local\programs\python\python310\lib\site-packages Requires: ipykernel, jupyter-client, metakernel Required-by:

Output of “jupyter kernelspec list”:

Available kernels:

  • python3: c:\users\kwas\appdata\local\programs\python\python310\share\jupyter\kernels\python3
  • scilab: c:\users\kwas\appdata\local\programs\python\python310\share\jupyter\kernels\scilab

Hello,

I have tried to install all required stuff from scratch on a fresh and non-admin “avuser” user account on a Windows 10 Pro (21H2) machine. Here is what it did, without having to get admin rights at anytime:

  1. install Scilab 2023.1.0 in default path
  2. install python for windows (https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe) and check “add Python to path” during installation
  3. pip install jupyter (on cmd command line)
  4. pip install scilab_kernel (on cmd command line)
  5. Add Scilab bin folder to Path user environment variable (on cmd command line)
setx Path "%Path%;C:\Users\avuser\AppData\Local\scilab-2023.1.0\bin"

Note: the SCILAB_EXECUTABLE environment variable seems useless in the current version of the Scilab kernel.

  1. logout/login the Windows session.

I was then able to launch a notebook (on cmd command line) with:

python -m notebook

The notebook started with the default Python kernel, I then choosed ‘Scilab’ from the kernel menu, and typed in the first cell

plot

followed by Ctrl + Enter, I obtained the following:

How do you integrate XCos in Jupyter, does it works?

Xcos has a dedicated GUI and Scilab GUI’s are not integrated in Jupyter. The Scilab kernel works as an engine taking its input from Jupyter cells and yielding text on the standard output and eventually graphics, which are also integrated in the html rendering of the notebook.