I cannot get the ExternalEvaluate work for my Python. It says "missing dependencies" for the registration status. I have attached screenshots from Mathematica and Terminal. From the terminal screenshot you can see that I already have "pyzmq" installed. Does anyone have a solution to this?
Asked
Active
Viewed 721 times
1 Answers
2
The question has not yet receive a formal answer so I put one here from the comments of Szabolcs and baker.
First install pyzmq by opening a terminal window and entering
pip install pyzmq
(the process takes a few minutes). That should be it! In Mathematica, type
FindExternalEvaluators["Python"]
which should show all the Python installations available. Note that the column "Registered" should now indicate "Automatic" for those versions of Python compatible with both Mathematica and pyzmq.
From here, you can run Python code in Mathematica. /if there is a problem, you can specifically specify which version you wan to select with for example:
session = StartExternalSession[{"Python", "Version" -> "2.7.16"}]
Make sure that the version selected is registered.
Denis Cousineau
- 1,099
- 6
- 18
-
Do you know why only some virtual environment would have missing dependencies? I have a working virtual environment (python 3.8). I created a new one and ran pip install pyzmq both inside this environment and outside to be sure (returning "Requirement already satisfied"). It is still saying
MissingDependencies. (While it saysTruefor the working environment.) – Kvothe Jun 21 '22 at 14:33 -


StartExternalSessionand specify which exact Python executable you want to use. You have several installations and the one ExternalEvaluate would start does not have the dependencies installed. – Szabolcs Sep 11 '19 at 07:17which pythonto get the correct path to the python executable. Use this path withStartExternalSession. See the docs (under Details) for how. – Szabolcs Sep 12 '19 at 20:00which python? – baker Sep 12 '19 at 21:11whichto find out the correct path, see https://linux.die.net/man/1/which – Szabolcs Sep 13 '19 at 06:16