From 6dfdc55060d301f95659d74224b7af9afdd95ee8 Mon Sep 17 00:00:00 2001 From: Miles Cranmer Date: Sat, 30 Dec 2023 23:51:50 +0000 Subject: [PATCH] Add tips on troubleshooting `libstdc++` to README --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c487ba357..d6f541a12 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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