似乎wolframscript不再适用于最新版本的raspbian。我试图在命令行上运行“wolframscript”,但它说它不是命令。当我尝试运行.wls脚本时,它给出了错误:
bash: /usr/local/bin/wolframscript: bad interpreter: No such file or directory
有什么方法可以重新安装wolframscript或让它工作?
答案 0 :(得分:0)
我也在最新的Raspberry Pi 3中找不到wolframscript,但是下面有效:
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}
答案 1 :(得分:0)
重新安装wolfram引擎:
sudo apt-get update && sudo apt-get install wolfram-engine
然后你应该得到这样的输出:
pi@tarzan:~/ $ wolframscript -code '{$Version, $ScriptCommandLine}'
{11.2.0 for Linux ARM (32-bit) (January 15, 2018), {wolframscript, -code, {$Version, $ScriptCommandLine}}}