Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on compiled_modules=False automatically? #487

Open
MilesCranmer opened this issue Jan 21, 2022 · 2 comments · May be fixed by #539
Open

Turn on compiled_modules=False automatically? #487

MilesCranmer opened this issue Jan 21, 2022 · 2 comments · May be fixed by #539

Comments

@MilesCranmer
Copy link
Collaborator

MilesCranmer commented Jan 21, 2022

Could compiled_modules=False be turned on automatically if the user does not have a dynamically linked libpython? As far as I can tell this doesn't present too big of a problem for a user to have the precompilation cache turned off.

raise UnsupportedPythonError(jlinfo)

This is currently an error, but I think it should instead be a warning to just let the user know that precompilation won't work. I think it should automatically re-run with Julia(..., compiled_modules=False) if compiled_modules=True does not work.

I do this automatically in my library which uses PyJulia: https://github.com/MilesCranmer/PySR/blob/57de9547c4d09ddada4249aa25b541f835fa04b3/pysr/sr.py#L965-L1003, so that users don't have to worry about python versions, but I think it should also be turned on in PyJulia itself.

@tkf
Copy link
Member

tkf commented Jan 21, 2022

That sounds like a good idea. (Although hopefully we can get rid of the libpython restriction once we have JuliaPy/PyCall.jl#945...)

@Moelf
Copy link

Moelf commented Nov 3, 2023

bump, we should definitely have this

@Moelf Moelf linked a pull request Nov 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants