Closed halirutan closed 5 years ago
I don't think so. You're basically asking wolframscript to accept some subset of kernel command-line options and relay them to the kernel, which I think will get very messy. But...what you're trying to do should work with WolframKernel. wolframscript is convenient because it handles activation, is generally on your path, automatically finds the best kernel to run, etc. But if your Wolfram Engine is activated, I think you can just run the kernel from the Wolfram Engine layout directly.
Report back here if you have any problems with that. If that works for you, then I think we should just close this issue.
I should clarify that this would only work on a properly activated Wolfram Engine. And you'll need to run wolframscript at least once to activate it.
@jfultz Hey John, thanks for answering. Let me reiterate:
The wolframscript that comes with my Mathematica 11.3 or 12 should already be properly activated because I can use Mathematica with the front end, right? To clarify, on my machine, it doesn't matter if I run in the terminal the wolframscript from the Mathematica release or from the free Wolfram Engine. In both cases, I get a fully functional REPL. As you can see in my comment above, I did run a 2+2
through the wolframscript successfully. However, what doesn't work is creating a WSTP link with LinkLaunch
to it. On the other hand, starting wolframscript -wstp
from terminal gives a link that can be used:
So why doesn't LinkLaunch
work when the above works?
And my main question is: The free Wolfram Engine comes (at least on Linux) only with one program: wolframscript
. For the usage with Jupyter, we need to be able to get a link to this.
@halirutan, yes it's fully activated.
And Wolfram Engine comes with lots of programs...it's just a matter of finding them. I don't have this set up on Linux to quote it to you, but I believe you can find what you're looking for in FileNameJoin[{$InstallationDirectory, "Executables/wolfram"}]
.
... In particular, the
LinkRead
here hangs
This line has been replaced with the following:
As such, is this issue okay to close?
@cc-wr Yes, I've seen your commit and I believe this is OK. My basic misunderstanding seemed to be that you can use the wolframscript
executable as option value to "WolframEngineBinary"
which doesn't work (at least on my machine).
I'm on Linux with Mathematica 11.3, 12.0 and the free Wolfram Engine. Let's assume I'm trying to set-up the Jupyter kernel to use the
wolframscript
as backend than this doesn't work. So a minimal example isHowever, this hangs Mathematica and the reason is that somehow
wolframscript
cannot be used to open a link successfully. In particular, theLinkRead
here hangshttps://github.com/WolframResearch/WolframLanguageForJupyter/blob/b70e8f5cdc23984d0aeb37729ea8fda30f35cd5b/WolframLanguageForJupyter/WolframLanguageForJupyter.m#L32
Simple example to reproduce:
However
Shouldn't it be possible to use the wolframscript kernel as a backend for Jupyter?
Btw, starting a link from the terminal with
wolframscript -wstp
, giving the link a name and connection then to it from within Mathematica withLinkConnect
does work.