TransWikia.com

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

Mathematica Asked on May 18, 2021

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:ProgramDataAnaconda3python.exe"]

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

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

3 Answers

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:UsersAppDataLocalContinuumanaconda3"] (for python executable)

SetEnvironment[ "PATH" -> Environment["PATH"] <> ";" <> "C:UsersAppDataLocalContinuumanaconda3Librarybin"] (for pyzmq library) just replace the path above with your own conda path.

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

RegisterExternalEvaluator["Python", "C:UsersAppDataLocalContinuumanaconda3python.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"] .

Correct answer by Tomi on May 18, 2021

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.

Answered by Jerry on May 18, 2021

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).

Answered by EthanYu on May 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP