我想为我的 Scilab 使用 jupyter 笔记本,所以除了我的 python 3.11 和 scilab 2023 之外,我还安装了 scilab_kernel
pip 安装 scilab_kernel。
我无法在 Jupyter Notebook 中创建绘图。
我没有管理员权限,但在 Windows 命令行中使用 setx 设置环境变量有帮助。
setx SCILAB_EXECUTABLE C:\Tools\scilab-2023.1.0 in\Scilex.exe setx 路径“%SCILAB_EXECUTABLE%;%PATH%”
不幸的是,JUPITER Notebook 没有绘图。 错误信息:
-nogui oder -nwni Modus deaktiviert 中的 Scilab 'plot2d' 函数。
使用 WScilex.exe 会在每次执行 Jupyter Notebook 中的单元格时打开 Scilab 应用程序
setx SCILAB_EXECUTABLE C:\Tools\scilab-2023.1.0 in\WScilex.exe
我必须为 SCILAB_EXECUTABLE 设置哪个 Scilab Exe? 如何设置像 -nwin 这样的选项?
如果我更改\WScilex-cli.exe中的SCILAB_EXECUTABLE C:\Tools\scilab-2023.1.0 并在 jupyter 笔记本中运行单元,没有任何反应
KERNEL status: BUSY
下面你可以找到我的 PowerShell 打印输出
Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
PS C:\Users\gschmidt> Get-ChildItem -Path Env:SCILAB_EXECUTABLE
Name Value
---- -----
SCILAB_EXECUTABLE C:\Tools\scilab-2023.1.0\bin\WScilex-cli.exe
PS C:\Users\gschmidt> python -m scilab_kernel.check
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Scilab kernel v0.9.10
Metakernel v0.29.5
Python v3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
Python path: C:\Users\gschmidt\AppData\Local\Programs\Python\Python311\python.exe
Connecting to Scilab...
Scilab connection established
Scilab version "2023.1.0.1684825887"
scilab-2023.1.0
PS C:\Users\gschmidt> jupyter notebook
[I 2023-08-02 09:40:54.049 ServerApp] Package notebook took 0.0000s to import
[I 2023-08-02 09:40:54.134 ServerApp] Package jupyter_lsp took 0.0887s to import
[W 2023-08-02 09:40:54.134 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-02 09:40:54.166 ServerApp] Package jupyter_server_terminals took 0.0331s to import
[I 2023-08-02 09:40:54.173 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-08-02 09:40:54.284 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-08-02 09:40:54.284 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-02 09:40:54.294 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-08-02 09:40:54.295 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-08-02 09:40:54.303 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-08-02 09:40:54.305 ServerApp] notebook | extension was successfully linked.
[I 2023-08-02 09:40:54.716 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-08-02 09:40:54.784 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-08-02 09:40:54.785 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-08-02 09:40:54.785 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-08-02 09:40:54.785 LabApp] JupyterLab extension loaded from C:\Users\gschmidt\AppData\Local\Programs\Python\Python311\Lib\site-packages\jupyterlab
[I 2023-08-02 09:40:54.785 LabApp] JupyterLab application directory is C:\Users\gschmidt\AppData\Local\Programs\Python\Python311\share\jupyter\lab
[I 2023-08-02 09:40:54.785 LabApp] Extension Manager is 'pypi'.
[I 2023-08-02 09:40:54.785 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-08-02 09:40:54.795 ServerApp] notebook | extension was successfully loaded.
[I 2023-08-02 09:40:54.795 ServerApp] Serving notebooks from local directory: C:\Users\gschmidt
[I 2023-08-02 09:40:54.795 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-08-02 09:40:54.795 ServerApp] http://localhost:8888/tree?token=fbfbca805ab46c134052d86e8cbd6540733db434310bf158
[I 2023-08-02 09:40:54.799 ServerApp] http://127.0.0.1:8888/tree?token=fbfbca805ab46c134052d86e8cbd6540733db434310bf158
[I 2023-08-02 09:40:54.799 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-08-02 09:40:54.860 ServerApp]
To access the server, open this file in a browser:
file:///C:/Users/gschmidt/AppData/Roaming/jupyter/runtime/jpserver-27380-open.html
Or copy and paste one of these URLs:
http://localhost:8888/tree?token=fbfbca805ab46c134052d86e8cbd6540733db434310bf158
http://127.0.0.1:8888/tree?token=fbfbca805ab46c134052d86e8cbd6540733db434310bf158
[I 2023-08-02 09:40:54.949 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[W 2023-08-02 09:41:19.285 ServerApp] Notebook Untitled.ipynb is not trusted
[W 2023-08-02 09:41:20.884 ServerApp] Notebook Untitled.ipynb is not trusted
[I 2023-08-02 09:41:21.134 ServerApp] Kernel started: 87e97bb2-1512-4ca5-94c9-d6af0008a502
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2023-08-02 09:41:23.155 ServerApp] Connecting to kernel 87e97bb2-1512-4ca5-94c9-d6af0008a502.
[I 2023-08-02 09:43:20.971 ServerApp] Saving file at /Untitled.ipynb
[I 2023-08-02 09:45:21.019 ServerApp] Saving file at /Untitled.ipynb
我相信它不起作用,因为我在电脑上的用户权限受到限制。如果我弄清楚问题是什么,我会让你知道。
它在我的家用电脑上完美运行。
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
使用
WScilex-cli.exe
代替 Scilex.exe
。