Skip to content

Turn on compiled_modules=False automatically? #487

@MilesCranmer

Description

@MilesCranmer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions