Closed New1997 closed 5 years ago
Hi @New1997, which operating system and which version of Scilab are you using?
ubuntu 18.04 scilab 6.0.1 sorry for not being specific earlier
I am using a similar setup. Did you set the SCILAB_EXECUTABLE
? I have export SCILAB_EXECUTABLE=~/scilab-6.0.2/bin/scilab-cli
in my ~/.bashrc
.
i use export SCILAB_EXECUTABLE=/usr/bin/scilab-adv-cli
but still the same, the kernel timeout
whenever I start the kernel (open a notebook) I got this Timeout waiting for kernel_info reply
after Kernel started
Let's try a low level approach, please launch python and try the following:
from scilab_kernel.kernel import ScilabKernel
wrapper = ScilabKernel().makeWrapper()
print(wrapper.run_command("ones('3')"))
On my machine that prints:
ans =
1.
I got No module named 'scilab_kernel'
Can you please do the following:
jupyter kernelspec list
cat <path_to_scilab_kernel>/kernel.json
And try with the python given in "argv"?
same output and btw why it use python and not pytohn3?
What was the path in argv
?
what do you mean?
I meant what was the python path the kernel was expecting to use.
e.g. /home/silvester/miniconda3/bin/python
/usr/local/share/jupyter/kernels/scilab/kernel.json
this is the path by kernelspec
this is the output of cat
{ "argv": ["python", "-m", "scilab_kernel", "-f", "{connection_file}"], "display_name": "Scilab", "language": "scilab", "mimetype": "text/x-octave", "name": "scilab" }
can you please give the contents of that file?
any luck?
Please try jupyter kernelspec remove scilab
and then pip install scilab_kernel
, and then paste the contents of that file again.
{ "argv": ["python", "-m", "scilab_kernel", "-f", "{connection_file}"], "display_name": "Scilab", "language": "scilab", "mimetype": "text/x-octave", "name": "scilab" }
I got the same content
Does python -c "import scilab_kernel"
work now?
the thing is I can't even do
from scilab_kernel.kernel import ScilabKernel
in python
Okay, what is which python
, which pip
?
first i install with pip3 but now i launch python 2.7 even python2.7 doesn't recognize
no it is okay, I see, It use miniconda python instead of global python
It uses whichever is first in your $PATH
how to fix it ?
btw i tried
from scilab_kernel.kernel import ScilabKernel
wrapper = ScilabKernel().makeWrapper()
print(wrapper.run_command("ones('3')"))
with python from /usr/bin
(I kind of using it raw for test)
and it got stuck at wrapper = ScilabKernel().makeWrapper()
edit:
to use native python over miniconda python i use a dirty fix: just add \export PATH="/usr/bin:$PATH"
at the end of .bashrc file (for those like me, who lost a bit between native python and miniconda python)
It just hangs?
yes
Do you have a scilab startup file? https://help.scilab.org/docs/5.3.3/en_US/startup.html
I will give you the output of ls .Scilab/scilab-6.0.1/
atoms
history
scinotesConfiguration.xml
XConfiguration.xml
configuration.xml
palettes.xml
WindowsConfiguration.xml
xcos.xml
so?
When you start scilab-cli from the command line, does it print -->
as the prompt?
No
$ scilab-cli
commons module not found.
graphic_objects module not found.
ui_data module not found.
graph module not found.
history_browser module not found.
slint module not found.
coverage module not found.
and
$ scilab-adv-cli
Picked up _JAVA_OPTIONS: -Djava.class.path=/usr/share/java/flexdock.jar:/usr/share/java/skinlf.jar:/usr/share/java/looks.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jhall.jar:/usr/share/java/lucene-core-4.10.4.jar:/usr/share/java/lucene-analyzers-common-4.10.4.jar:/usr/share/java/lucene-queryparser-4.10.4.jar:/usr/share/maven-repo/org/freehep/freehep-util/debian/freehep-util-debian.jar:/usr/share/maven-repo/org/freehep/freehep-io/debian/freehep-io-debian.jar:/usr/share/maven-repo/org/freehep/freehep-graphicsio/debian/freehep-graphicsio-debian.jar:/usr/share/java/freehep-graphicsio-emf-2.1.jar:/usr/share/java/freehep-graphics2d-2.1.1.jar:/usr/share/java/jrosetta-API.jar:/usr/share/java/jrosetta-engine-1.0.4.jar:/usr/share/java/jgraphx.jar:/usr/share/java/jogl2.jar:/usr/share/java/gluegen2-rt.jar:/usr/share/java/jeuclid-core.jar:/usr/share/java/jlatexmath-fop-1.0.7.jar:/usr/share/java/fop.jar:/usr/share/java/saxon.jar:/usr/share/java/batik.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/jlatexmath-1.0.7.jar:/usr/share/java/ecj.jar:/usr/share/java/javax.activation.jar:/usr/share/java/jaxb-runtime.jar:/usr/share/scilab/modules/commons/jar/org.scilab.modules.commons.jar:/usr/share/scilab/modules/gui/jar/org.scilab.modules.gui.jar:/usr/share/scilab/modules/xcos/jar/org.scilab.modules.xcos.jar:/usr/share/scilab/modules/history_browser/jar/org.scilab.modules.history_browser.jar:/usr/share/scilab/modules/ui_data/jar/org.scilab.modules.ui_data.jar:/usr/share/scilab/modules/external_objects_java/jar/org.scilab.modules.external_objects_java.jar:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar:/usr/share/scilab/modules/preferences/jar/org.scilab.modules.preferences.jar:/usr/share/scilab/modules/core/jar/org.scilab.modules.core.jar:/usr/share/scilab/modules/scinotes/jar/org.scilab.modules.scinotes.jar:/usr/share/scilab/modules/graphic_export/jar/org.scilab.modules.graphic_export.jar:/usr/share/scilab/modules/types/jar/org.scilab.modules.types.jar:/usr/share/scilab/modules/scirenderer/jar/scirenderer.jar:/usr/share/scilab/modules/graphic_objects/jar/org.scilab.modules.graphic_objects.jar:/usr/share/scilab/modules/renderer/jar/org.scilab.modules.renderer.jar:/usr/share/scilab/modules/helptools/jar/org.scilab.modules.helptools.jar:/usr/share/scilab/modules/helptools/jar/scilab_images.jar:/usr/share/scilab/modules/helptools/jar/scilab_ru_RU_help.jar:/usr/share/scilab/modules/helptools/jar/scilab_en_US_help.jar:/usr/share/scilab/modules/localization/jar/org.scilab.modules.localization.jar:/usr/share/scilab/modules/console/jar/org.scilab.modules.console.jar:/usr/share/scilab/modules/completion/jar/org.scilab.modules.completion.jar:/usr/share/scilab/modules/action_binding/jar/org.scilab.modules.action_binding.jar:/usr/share/scilab/modules/graph/jar/org.scilab.modules.graph.jar:/usr/share/scilab/modules/javasci/jar/org.scilab.modules.javasci.jar:/usr/share/scilab/modules/history_manager/jar/org.scilab.modules.history_manager.jar:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.scilab.modules.jvm.LibraryPath (file:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar) to field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of org.scilab.modules.jvm.LibraryPath
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
commons module not found.
graphic_objects module not found.
ui_data module not found.
graph module not found.
history_browser module not found.
slint module not found.
coverage module not found.
Do I need to purge all and install manually from scilab official page? (This one is the ubuntu from apt-get so I can't even use ATOMS)
Are you able to interact with that session? If so, what does disp(prompt())
show?
Nothing
Yeah, something is corrupt then. Getting a working version of Scilab that shows that prompt is apparently the entry point :smile:
I can interact with it but it won't show any results but when using scilab-adv-cli I can use plot or surf and it create a new graphic window without any problem
It only happens when I attempt to install scilab_kernel using python pip for the first time then even if I pruge everything it stays the same
Hmm, maybe try with the adv-cli with a fresh install?
I think I will install using the package directly from scilab, I will purge everything for now Then I will comeback
oh I see, you did that
I'm not sure, we're just sending commands for scilab to run and waiting for -->
to come back.
when using in cli or adv-cli the terminal went dead only the gui version works
I'm curious if you can plot from adv-cli from a fresh install
I download scilab6.0.2.gz and extract the files Everything works fine including scilab-adv-cli, it show plot, so how to make jupyter recognize the kernel?
I don't know why but it takes too much time, then it hangs
ok, the question earlier says a lot about me (I am newbie) and it was answered earlier: export SCILAB_EXECUTABLE=~/scilab-6.0.2/bin/scilab-cli
in ~/.bashrc
So I will just stick to scilab from .gz rather than try the impossible with the package from apt-get
so with that variable defined, does the kernel start now?
yep thanks, you can close the ticket i might be because of the ubuntu version so someone need to contact them maybe?
I can't use scilab with jupyter because it always timeout and won't execute the code