1
$\begingroup$

TensorFlow datasets are available at https://www.tensorflow.org/datasets. I wonder if there's a way to directly import any of those datasets directly into Mathematica 12. I tried

ExternalEvaluate["Python", "import tensorflow_datasets as tfds"]

However, I receive a number of errors, mainly about missing zmq. So, I went back and installed zmq with

pip install pyzmq

zymq install seems fine because if I issue the command again, I receive the following outptut

Requirement already satisfied: pyzmq in ./anaconda3/lib/python3.8/site-packages (20.0.0)

When I try FindExternalEvaluate, it seems to recognize many versions of Python on my system, however 3.8 still seems to be missing the zmq link

FindExternalEvaluate output

I am not sure how to proceed to fix this error and then move to the real task of importing tensorflow datasets. Any help is highly appreciated.

Thank you,

$\endgroup$
2
  • $\begingroup$ Possible duplicate? $\endgroup$ Nov 23 '21 at 13:06
  • $\begingroup$ I had to set up python using RegisterExternalEvaluator with a target pointing to the appropriate python executable. FindExternalEvaluators["Python"] returns that python is registered, which allows me to run your ExternalEvaluate code without errors (save that I only have the dataset installed, not tensorflow). $\endgroup$ Nov 23 '21 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.