# Importing Python Module in Julia: MESA\_reader

**URL:** https://discourse.julialang.org/t/importing-python-module-in-julia-mesa-reader/2345
**Category:** General Usage
**Created:** [February 27, 2017, 6:31pm UTC](https://discourse.julialang.org/t/importing-python-module-in-julia-mesa-reader/2345 "2017-02-27T18:31:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![astrowanders](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@astrowanders](https://discourse.julialang.org/u/astrowanders)
#### Post date: [February 27, 2017, 6:31pm UTC](https://discourse.julialang.org/t/importing-python-module-in-julia-mesa-reader/2345/1 "2017-02-27T18:31:29Z")

</div>

Hello,

I would like to preface my question with a note that MESA is a stellar evolution code ([http://mesa.sourceforge.net/](http://mesa.sourceforge.net/))

I’m trying to import mesa\_reader - a Python module for reading MESA output - with PyCall, but am receiving the following error: ![](https://global.discourse-cdn.com/julialang/original/3X/9/1/91dfea5350dcb57be31763a752a6381ced662257.png)  
Is this because mesa\_reader is a 3rd party Python module?  
Details about mesa\_reader are here: [GitHub - wmwolf/py\_mesa\_reader: Tools for easily accessing and manipulating data from MESA in python.](https://github.com/wmwolf/py_mesa_reader)  
I installed mesa\_reader in my Python site packages as noted.

Thanks!

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [February 27, 2017, 7:40pm UTC](https://discourse.julialang.org/t/importing-python-module-in-julia-mesa-reader/2345/2 "2017-02-27T19:40:31Z")

</div>

> [@astrowanders](#):
>
> 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?

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 `Pkg.build("PyCall")`, as explained in the [PyCall README](https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version). (You will need to quit Julia and re-launch it.)
