I want to use specific python libraries via the Mathematica frontend. This is possible as follows
In[30]:= ExternalEvaluate["Python", "from sympy import isprime; isprime(7)"]
Out[30]= True
However, if I directly try to evaluate the same using > at the beginning of a line to use an external code cell, this does not work. For instance,
from sympy import isprime; isprime(7)
gives as output,
Out[31] = Failure[[WarningSign] Message: No module named 'sympy' Tag: PythonError ]
How can we make this work from within external code cells?