1
$\begingroup$

My question is similar to the one posted here: WolframEngine install + wolframclient for Python on Ubuntu. However, this solution is not fixing my problem.

I cannot get the wolframclient library to successfully connect to the WolframKernel that is installed on my machine.

I have installed Mathematica 12.0 (for student) on laptop (Pixelbook).

When I run:

from wolframclient.evaluation import WolframLanguageSession
session = WolframLanguageSession(kernel='/usr/local/Wolfram/WolframEngine/12.0/Executables/wolfram')
session.start() <-- this call will fail resulting in a socket exception: Socket operation aborted. 

we 'Failed to communicate with kernel'

Furthermore, I am able to launch Mathematica from terminal, so there is clearly an activated kernel.

Any thoughts?

$\endgroup$
  • $\begingroup$ Is it TCP/IP connection? What's about the firewall permissions? Or permissions for access to folders? $\endgroup$ – Rom38 Jun 8 at 6:39
  • $\begingroup$ The WolframEngine uses ZMQ sockets for communication beyond that, I don't know. The Kernels live in /usr/local/path-to-kernel so I don't think there would be a permissions problem. $\endgroup$ – aadharna Jun 9 at 2:34
1
$\begingroup$

Note: One way I got around this was my instead pointing to my kernel that Mathematica uses.

kernel=/usr/local/Wolfram/Mathematica/12.0/Executables/WolframKernel

However, this only works because my university has a site license for Mathematica. Therefore, this is not a true solution.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.