Raspbian Stretch wolframscript not working

272 Views Asked by At

It appears that wolframscript no longer works on the newest version of raspbian. I have tried to run "wolframscript" on the command line but it says that it is not a command. When I attempt to run a .wls script it gives me the error:

    bash: /usr/local/bin/wolframscript: bad interpreter: No such file or directory

Any way to reinstall wolframscript or get it to work?

2

There are 2 best solutions below

0
On BEST ANSWER

Just reinstall the wolfram engine:

sudo apt-get update && sudo apt-get install wolfram-engine

Then you should get an output like this:

pi@tarzan:~/ $ wolframscript -code '{$Version, $ScriptCommandLine}'
{11.2.0 for Linux ARM (32-bit) (January 15, 2018), {wolframscript, -code, {$Version, $ScriptCommandLine}}}
0
On

I also can't find wolframscript in latest Raspberry Pi 3, but the below works:

pi@raspberrypi:~ $ cat >hello.wsc <<'EOF'
#!/usr/bin/wolfram -script
Print["Hello"]
Print[$CommandLine]
EOF

pi@raspberrypi:~ $ chmod +x hello.wsc
pi@raspberrypi:~ $ ./hello.wsc one 2 three
Hello
{/opt/Wolfram/WolframEngine/11.0/SystemFiles/Kernel/Binaries/Linux-ARM/WolframKernel, -script, ./hello.wsc, one, 2, three}