Message Boards Message Boards

GROUPS:

How can we make ExternalEvaluate work in Mathematica 12.0 version?

Posted 1 year ago
924 Views
|
0 Replies
|
0 Total Likes
|

Hi all, I am having trouble in making ExternalEvaluate work on Mathematica 12.0 version inspite of the proper setup of Python and Nodejs external programs on my system. For e.g. I do run the FindExternalEvaluators call on my notebook

FindExternalEvaluators["NodeJS"]

I am returned back as output two different evaluators available for nodejs with two different executables in different paths.

If I do a StartExternalSession of either Python or Nodejs, I get the following error:

session = StartExternalSession["NodeJS"]
StartExternalSession::replFail: The process for external system NodeJS (/usr/bin/node) failed to start due to : no input returned from process..

If I do a ExternalEvaluate of a very simple Nodejs expression, I get the following error:

ExternalEvaluate["NodeJS", "Math.sqrt(36)"]
StartExternalSession::replFail: The process for external system NodeJS (/usr/bin/node) failed to start due to : internal/modules/cjs/loader.js:1201
  return process.dlopen(module, path.toNamespacedPath(filename));
Error: The module '/home/vas\[Ellipsis] js/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
.

Even if I register a specific external evaluator to a valid and an available executable filepath like as follows, the external evaluation is not working on my system:

RegisterExternalEvaluator["NodeJS", "/usr/bin/node"]
"5e0b624d-4f59-431c-bcf7-9c011420bcc8"

Even after setting the above ExternalEvaluator, the ExternalEvaluate is giving the same stack trace error as mentioned above.

Is there any specific environment issue that is not allowing any of the External evaluation programs working fine for my installation?

I am running Mathematica 12.0 on Ubuntu Linux.

Thanks.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract