7

I really like the new 'ExternalLanguage' cell in v11.3. Is there a way to tell the cell to use a specific conda environment, either as default or for a specific input cell?

enter image description here

Mathematica can find anaconda:

enter image description here

But doesn't list any of my envs

enter image description here

Trying to register them fails without a message:

enter image description here

Updates:

I can't start an external session:

enter image description here

The syntax highlighting seems to be off, how do I turn it on?

enter image description here

user5601
  • 3,573
  • 2
  • 24
  • 56
  • 2
    The first part is answered by https://mathematica.stackexchange.com/q/167605/38205. The second part (syntax highlighting) isn't implemented for python. – b3m2a1 Mar 13 '18 at 20:28
  • @b3m2a1 What about not being able to run StartExternalSession for any conda environment, has anyone complained about that yet? – user5601 Mar 13 '18 at 20:31
  • ZMQ isn't installed for Conda. See this: https://mathematica.stackexchange.com/a/155815/38205 for how to get venv (or other types of distros) working. – b3m2a1 Mar 13 '18 at 20:35
  • 1
    Ah-ha, all I had to do was pip install zmq and now my conda env shows up in FindExternalEvaluators! – user5601 Mar 13 '18 at 20:44
  • 1
    The syntax highlight is not off, it is simply not implemented for python. – Szabolcs Mar 14 '18 at 08:58

1 Answers1

7

You can do this with SetLanguageCellSession. I've just answered a similar question here, see that answer for an explanation of how what you want can be done in version 12.1+:

enter image description here

M.R.
  • 31,425
  • 8
  • 90
  • 281