In the above screenshot, I've shared the installed and registered version of python. However, when I try to use it, it ends up with an error.
res = ExternalEvaluate[session, "import math
[math.sqrt(i) for i in range(10)]"]
I tried another methods, there also I faced errors
res = ExternalEvaluate[session, "/home/FDM.py"]





math.sqrtgives an error (unexpected indent) because there are 2 spaces before[math. ...(maybe it was added after pasting). For running a file, following this workflow,Fileis used. $\endgroup$import math? Also does something simple like1 + 1return a result? Which version of Mma and which OS? $\endgroup$res = ExternalEvaluate["Python", "import math\n[math.sqrt(i) for i in range(10)]"]$\endgroup$