Importing Python Module in Julia: MESA_reader



I would like to preface my question with a note that MESA is a stellar evolution code (

I’m trying to import mesa_reader - a Python module for reading MESA output - with PyCall, but am receiving the following error:
Is this because mesa_reader is a 3rd party Python module?
Details about mesa_reader are here:
I installed mesa_reader in my Python site packages as noted.



No, PyCall doesn’t care whether the module is built-in or 3rd-party.

Probably you installed it into the wrong version of Python. Looking at PyCall.python will tell you what version of Python PyCall is configured to use on your system. By default on Mac and Windows, it uses its own Anaconda “miniconda” distribution via the Conda package for Julia, and you can install Anaconda Python packages via using Conda; Conda.add("somepackage"). However, it doesn’t look like there is an Anaconda package for mesa_reader?

To switch PyCall to use a different version/installation of Python on your system, set the PYTHON environment variable to the path of the python executable you want to use and re-run"PyCall"), as explained in the PyCall README. (You will need to quit Julia and re-launch it.)