+1 vote

Another question is whether Mathematica/WolframEngine must be installed on the computer on which cadabra is being built, or whether the option -DENABLE_MATHEMATICA=ON is sufficient.

Thank you!

related to an answer for: Copy output to mathematica

I haven't tried with Wolfram Engine, but if what they write is true, then it should work. Be aware that I haven't built against Mathematica for a long time, so things like the CMake support to figure out where the Wolfram software is located on disk may not work. Also, the code that bridges between Cadabra and Mathematica notation is not as tested as that to SymPy.

You do need the Wolfram software installed locally as Cadabra will need the headers of the WRSTP library https://www.wolfram.com/wstp/ to build. I cannot distribute those along with Cadabra as that violates Wolfram's terms.

If you do give it a try, please post here to let us know how it went.

by (71.6k points)
selected by

I tested and found that the cmake module can't find the Wolfram Engine, but this can be easily fixed: one has to create a symlink somewhere in the \$PATH (for example, in /usr/bin) to the file /opt/WolframEngine/Executables/math (here the initial part /opt/WolframEngine can be different in different installation).

After this small fix, it works!

Hi @velbovet. I've tried your way to fix finding Wolfram Engine problem, but it didn't help. Do you have any advice on how else to solve this problem?

You could try more symlinks. I use the Slackware distribution, where the Wolfram Engine is installed with the bash script https://slackbuilds.org/slackbuilds/15.0/academic/WolframEngine/WolframEngine.SlackBuild This script creats symlinks for MathKernel, WolframKernel, WolframPlayer, math, mcc, wolfram, wolframplayer, wolframscript. You could try all of them, even if in my testing math was enough.

Also you could create an issue at https://github.com/sakra/FindMathematica