Skip to content

Can't use pysr on linux #899

Answered by MilesCranmer
Vahan-tech asked this question in Q&A
Apr 24, 2025 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Unfortunately I don't know enough about your environment or IDE to help, sorry. Maybe reach out to help forums for whatever IDE you are using or your IT help desk (if you are doing this on your workplace machine).

As a quick hack you could put the following code in place of wherever your pysr import is

import os
ld_lib_path = os.environ["LD_LIBRARY_PATH"]
os.environ["LD_LIBRARY_PATH"] = ""  # Clear it

# Only after that, you can import pysr
import pysr

# Then, reset your LD_LIBRARY_PATH env variable
os.environ["LD_LIBRARY_PATH"] = ld_lib_path

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Vahan-tech
Comment options

@MilesCranmer
Comment options

Answer selected by Vahan-tech
@Vahan-tech
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #898 on April 24, 2025 17:29.