Message Boards Message Boards

0
|
2148 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Missing dependencies after registering Python as external evaluator

Posted 1 year ago

Hi all,
I've registered Python as external evaluator and when I am going to find the external evaluator with FindExternalEvaluator["Python"], I got the correct python version and executable but I have "missing dependencies".
Any idea how to solve the issue?
Thanks and regards
Paolo

POSTED BY: Tarpanelli Paolo
Posted 11 months ago

You need to specify where to find Python:

 RegisterExternalEvaluator[
    "Python", 
    "C:\\bin\\Anaconda3\\python.EXE"]

Register a Python-Numpy library:

    RegisterExternalEvaluator[
        "Python-NumPy", 
        "C:\\bin\\Anaconda3\\python.EXE"]

How to import a Numpy library

    ExternalEvaluate[
        "Python", 
        "import numpy; x = numpy.pi; x**2"
    ]

Import any libraries:

ExternalEvaluate[
        "Python", 
        "from sympy import isprime; isprime(7)"
    ]

Examples from the following websites: https://www.johndcook.com/blog/2019/04/18/calling-python-from-mathematica/.

POSTED BY: Sangdon Lee
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