7
$\begingroup$

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

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

1 Answer 1

7
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.