RegisterExternalEvaluator
Listing of External Evaluators »RegisterExternalEvaluator[sys,evaluator]
registers the evaluator for use as an external evaluator with the language or system sys.
RegisterExternalEvaluator[sys,evaluator,name]
registers the evaluator using the assigned name name.
Details
- RegisterExternalEvaluator returns a reference to the evaluator, typically a file path.
- Registered evaluators can be identified using FindExternalEvaluators.
- evaluator is typically an executable file that can be used to execute code for the system sys, but can also be specified as File[…] or DatabaseReference[…].
- In RegisterExternalEvaluator[sys,evaluator], possible choices of sys include:
-
"Python" Python "NodeJS" JavaScript running through Node.js "Julia" Julia "Ruby" Ruby "R" R "Shell" Bash, Sh, Zsh, ... "Jupyter" Jupyter kernel "SQL" SQL database "SQL-JDBC" SQL database using JDBC - External evaluator registrations persist between Wolfram Language sessions.
- Evaluators registered with RegisterExternalEvaluator can be unregistered with UnregisterExternalEvaluator.
- RegisterExternalEvaluator encrypts and stores sensitive evaluator data such as database passwords using the system keychain.
Examples
open allclose allBasic Examples (4)
Register a new NodeJS installation at the location "/usr/local/bin/node":
Use FindExternalEvaluators to see that the NodeJS installation is registered:
Register a Python installation found at the location "/usr/bin/python3":
Use the newly registered Python:
Register a Python provisioned environment using a name:
Use the newly registered environment by referring to it by name:
Define a reference to a database using SQLite:
Register the database using RegisterExternalEvaluator:
When using ExternalEvaluate, "SQL" will use the most recently registered database:
To unregister the database, use UnregisterExternalEvaluator:
Scope (1)
Register a Python installation using a name:
Use the newly registered environment:
The name can also be found when using FindExternalEvaluators:
Properties & Relations (1)
Unregister all external evaluators with UnregisterExternalEvaluator:
ExternalEvaluate will attempt to provide an evaluator when you do not have registered evaluators anymore:
For the "Python" evaluator, a new installation is created under $UserBaseDirectory:
Possible Issues (1)
Text
Wolfram Research (2017), RegisterExternalEvaluator, Wolfram Language function, https://reference.wolfram.com/language/ref/RegisterExternalEvaluator.html (updated 2020).
CMS
Wolfram Language. 2017. "RegisterExternalEvaluator." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/RegisterExternalEvaluator.html.
APA
Wolfram Language. (2017). RegisterExternalEvaluator. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegisterExternalEvaluator.html