ajwheeler / ajwheeler/Korg.jl

Trying to get Korg called from Python on Mac / Jupyter

Open
#509 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
67
Forks
15
Avg merge
2d 6h
Merged PRs (30d)
6

Description

I'm very interested in using Korg to teach stellar atmospheres this semester at Penn State. I've never used it before and have no experience with Julia.

I followed the installation instructions here on my M2 Mac running OSX 15.7.2:
https://ajwheeler.github.io/Korg.jl/stable/install/

For both Julia and Python in an environment running Python 3.14.

I am able to run the example here in a Jupyter notebook (7.2.1) running Julia:

```
using Korg, PythonPlot
```
```
λs, flux, cntm = synth(; Teff=5777, logg=4.44, wavelengths=(5000, 5050))
plot(λs, flux, "k-")
xlabel("λ [Å]")
ylabel("Flux")
```

without incident. In a Python notebook, however, this code from the example causes Python to crash:
```
from juliacall import Main as jl
jl.seval("using Korg")
Korg = jl.Korg
```
```
wls, flux, continuum = Korg.synth(
Teff=5000,
logg=4.32,
M_H=-1.1,
C=-0.5,
linelist=Korg.get_GALAH_DR3_linelist(),
wavelengths=(5850, 5900)
)
```

"Python quit unexpectedly". I get this error both as a MacOS popup and as an error in the notebook, where the kernel refreshes.

How can I diagnose this? Some googling reveals it might have something to do with threading, which I don't have experience with on my Mac.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.