Skip to content

Commit

Permalink
Add tips on troubleshooting libstdc++ to README
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer authored Dec 30, 2023
1 parent d366b04 commit 6dfdc55
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ If you've finished a project with PySR, please submit a PR to showcase your work
- [Contributors](#contributors-)
- [Why PySR?](#why-pysr)
- [Installation](#installation)
- [pip](#pip)
- [conda](#conda)
- [docker](#docker-build)
- [Troubleshooting](#troubleshooting)
- [Quickstart](#quickstart)
- [→ Documentation](https://astroautomata.com/PySR)

Expand Down Expand Up @@ -179,12 +183,25 @@ For more details, see the [docker section](#docker).

---

### Common issues
### Troubleshooting

Common issues tend to be related to Python not finding Julia.
To debug this, try running `python3 -c 'import os; print(os.environ["PATH"])'`.
If none of these folders contain your Julia binary, then you need to add Julia's `bin` folder to your `PATH` environment variable.

Another issue you might run into can result in a hard crash at import with
a message like "`GLIBCXX_...` not found". This is due to another one of the Python dependencies
loading an incorrect `libstdc++` library. To fix this, you should modify your
`LD_LIBRARY_PATH` variable to reference the Julia libraries. For example, if the Julia
version of `libstdc++.so` is located in `$HOME/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/lib/julia/`
(which likely differs on your system!), you could add:

```
export LD_LIBRARY_PATH=$HOME/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/lib/julia/:$LD_LIBRARY_PATH
```

to your `.bashrc` or `.zshrc` file.

**Running PySR on macOS with an M1 processor:** you should use the pip version, and make sure to get the Julia binary for ARM/M-series processors.

## Quickstart
Expand Down

0 comments on commit 6dfdc55

Please sign in to comment.