jupyter-notebookjupyterscilab

How to plot with Scilab Jupiter notebook?


I would like to utilize Jupyter Notebook for my Scilab environment. In addition to having Python 3.11 and Scilab 2023 installed, I've also added the Scilab kernel using the following command:

pip install scilab_kernel

However, I'm encountering issues with creating plots within Jupyter Notebook. It's important to note that I do not have administrative rights, but I found a workaround by setting the environment variable using the Windows Command Line as shown below:

setx SCILAB_EXECUTABLE C:\Tools\scilab-2023.1.0\bin\Scilex.exe
setx PATH "%SCILAB_EXECUTABLE%;%PATH%"

Unfortunately, I'm still unable to generate plots in Jupyter Notebook, and I'm receiving the following error message:

Scilab 'plot2d' function disabled in -nogui or -nwni mode.

I've tried using "WScilex.exe" instead of "Scilex.exe," but this opens the Scilab application each time I execute a cell in Jupyter Notebook using the following command:

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

My questions are:

  1. Which Scilab executable should I set for the SCILAB_EXECUTABLE variable?
  2. How can I set options like -nwin?

Additionally, I've provided images and a PowerShell printout for reference.


Solution

  • It may sound peculiar, but following the installation of PyCharm, everything is now functioning precisely as anticipated. Perhaps it automatically updated all the Python packages.