7
$\begingroup$

I had Anaconda 3 installed on my system and python registered with the following link:

RegisterExternalEvaluator["Python","C:\\Users\\atfai\\Anaconda3\\python.exe"]

I recently updated some libraries in Anaconda 3 and then ExternalEvaluate and ExternalLanguage cell stopped working giving the following error.

StartExternalSession::noinstall: No valid installations for system Python were found with the options specified.

So I cleared the cache of the ExternalEvaluate using the following command: ExternalEvaluate`Private`resetCache[]

and attempted to register again:

RegisterExternalEvaluator["Python","C:\\Users\\atfai\\Anaconda3\\python.exe"]

giving the following weird error:

RegisterExternalEvaluator::invalid: -- Message text not found -- (ExternalEvaluate`Private`reason)

I rebooted my computer but nothing is fixing the issue. Please help.

$\endgroup$
7
  • 1
    $\begingroup$ Make sure you follow the instructions here and have zmq installed. $\endgroup$
    – Szabolcs
    Feb 12, 2019 at 18:34
  • $\begingroup$ Found out the issue. After downgrading to version 3.6.7 using conda install python = 3.6.7, it worked again. Since I did installed new libraries and did a general update it updated my python version to 3.6.8 which is not working with ExternalEvaluate (mathematica 11.3). Maybe it will be supported from 12.0 onwards. $\endgroup$
    – user13892
    Feb 12, 2019 at 18:38
  • $\begingroup$ Hmm ... M11.3's ExternalEvaluate seems to work fine for me with Python 3.7.2 installed through Anaconda. $\endgroup$
    – Szabolcs
    Feb 12, 2019 at 18:41
  • 1
    $\begingroup$ Also i made the following mistake: I registered my python distribution using RegisterExternalEvaluator and it showed in FindExternalEvaluators as registered then instead of using UnregisterExternalEvaluator first i directly used the resetCache[] command which removed it from list generated by FindExternalEvaluators but probably remained registered which could have bugged my installation. Can you try this and see whether you can register again and reproduce my bug? $\endgroup$
    – user13892
    Feb 12, 2019 at 21:45
  • 1
    $\begingroup$ Thanks for ExternalEvaluate`Private`resetCache[], I remove the python low version before unregistering it, and this function helps clean it out. $\endgroup$ Apr 4, 2021 at 19:46

1 Answer 1

1
$\begingroup$

It all works for me with python 3.6.8 and 11.3 as well. I tried using python 3.9.13 and python 3.7.2 and installed the pyzmq packages for each of them, but they still didn't work in mma.

$\endgroup$
1
  • 2
    $\begingroup$ This useful information can be added in as a comment as it doesn't answer the question. $\endgroup$
    – Syed
    Sep 24, 2022 at 20:56

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.