# How to register Anaconda3(Python3.7) as external evaluator enviroment?

I have installed Anaconda3 (version 5.3.1 for Windows with Python 3.7, 64-bit) as the Python working enviroment, but when trying to register it as an external evaluator, it RegisterExternalEvaluator fails.

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

RegisterExternalEvaluator::invalid: -- Message text not found -- (ExternalEvaluatePrivatereason)


Mathematica can only can find the Python evaluator installed by SystemInstall["Python"], but I need to use the Anaconda version.

• Please eliminate the trivial issues, make sure you follow the documentation precisely, and if it still does not work, then fully update/rewrite the question (don't just comment), including all relevant information (what did you do, what happened e.g. errors messages, what did you expect to happen) Nov 27, 2018 at 10:44
• I am getting a failure (providing the path to the executable) with RegisterExternalEvaluator::invalid: -- Message text not found -- (ExternalEvaluatePrivatereason). Nov 27, 2018 at 11:26
• See the workflow Configure Python For ExternalEvaluate in the documentation. If after following those instructions you still have an issue then see this post (155821). Nov 27, 2018 at 12:30
• Did you install pyzmq? Dec 2, 2018 at 8:17
• Yes, pyzmq was intalled via pip command. Dec 2, 2018 at 8:48

After two days of battling this problem on Windows10, with limited success (including full system reset), the problem was fixed from this link: https://community.wolfram.com/groups/-/m/t/1975953

For posterity, the solution is

With the help of Wolfram support team, I figured out how to get the conda work in MMA in windows.

1. conda's installation and library path is not in Mathematica's default Path. So we need to manually add the path by:

SetEnvironment[ "PATH" -> Environment["PATH"] <> ";" <> "C:\Users\\AppData\Local\Continuum\anaconda3"] (for python executable)

SetEnvironment[ "PATH" -> Environment["PATH"] <> ";" <> "C:\Users\\AppData\Local\Continuum\anaconda3\Library\bin"] (for pyzmq library) just replace the path above with your own conda path.

1. (re-)Register the conda in MMA by:

RegisterExternalEvaluator["Python", "C:\Users\\AppData\Local\Continuum\anaconda3\python.exe"] again replace the path above with your own conda path.

1. Now the conda should work in Mathematica. You can check it by FindExternalEvaluators["Python"] .

After reinstalling Anaconda different versions many times, it comes true that MMA does not support registering Python3.7 as an external evaluator now, so if Anaconda chosen to be used, choose the right version is necessary here, Anaconda3-5.2.0, which integrated Python3.6, more versions could be found at the archive site .

When Anaconda5.2 installed, follow the offical steps to make it. see more here and help center.

• I see no problems with Python 3.7 on macOS i.stack.imgur.com/yhuq9.png Dec 2, 2018 at 8:20
• @Szabolcs Thanks! I have no idea about ver.3.7 on MacOS, using Windows. Dec 2, 2018 at 8:47
• Have you asked WRI Support?
– Kuba
Dec 2, 2018 at 11:09
• @Kuba Not yet. I just try to determine whether it's proper to work with Python in the notebook or not. The default method supported by SystemInstall is enough at the end. Dec 2, 2018 at 11:42
• I cannot get python 3.7.5 working in Mathematica 12.0 in Windows 10 too. So I create an environment of python 3.6 and it works now. Nov 7, 2019 at 0:34

On mac in 2022:

SetEnvironment["PATH"->Environment["PATH"]<>";"<>"/opt/anaconda3/envs/py38/bin/"];

RegisterExternalEvaluator["Python","/opt/anaconda3/envs/py38/bin/python"]


I am using MMA 12.0. After many attempts, I found that any version of Python could work on Windows 10 as long as you are not using anaconda-python. Just properly set the PATH to make sure you can properly install pyzmq. I also tried anaconda with python 3.7.3, but MMA just could not recongnize it (though pyzmq is also installed).