so I'm running into a strange problem using
Import to import the output of a python 3.6 script.
I have a script
my_script.py which just contains
If from within Mathematica I pass
pythonOutput = Import["!python my_script.py", "String"]
I get the expected
However, I am on Mac OS where the default installation of python is python 2.7 and so if I want to run my code in python 3.x in the terminal I would have to say
python3 my_script.py (which works fine)
However, when I modify my Mathematica code to say
pythonOutput = Import["!python3 my_script.py", "String"]
I get no output! Does anyone know why this might be the case? The command
python3 my_script.py works perfectly fine from the terminal but not within an Import statement.
I have also tried every suggestion from this question and none of them work with the python3 command.