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

[Feature] Get pip to install juliaup #274

Closed
MilesCranmer opened this issue Mar 9, 2023 · 6 comments
Closed

[Feature] Get pip to install juliaup #274

MilesCranmer opened this issue Mar 9, 2023 · 6 comments
Labels
enhancement New feature or request priority: mid

Comments

@MilesCranmer
Copy link
Owner

I’m thinking about how to make PySR even easier to set up and install. The conda side is already automatic which is great; I’m thinking about the pip side now. One idea I had is that, if a user doesn’t have a copy of Julia on their path, then installing PySR with pip could trigger an automatic install of juliaup, with a bunch of interactive prompts to ask the user if they want to, where they want to install, etc. Following this, it would automatically run pysr.install().

Maybe this could even be done on the PyJulia side of things… What do you think @mkitti?

@MilesCranmer MilesCranmer added the enhancement New feature or request label Mar 9, 2023
@mkitti
Copy link
Contributor

mkitti commented Mar 9, 2023

Sure. You might still want a prompt to ask the user to proceed.

You may want to consider https://github.com/johnnychen94/jill.py
... but juliaup is a pretty good solution going forward.

@mkitti
Copy link
Contributor

mkitti commented Mar 9, 2023

@MilesCranmer MilesCranmer self-assigned this Mar 25, 2023
@MilesCranmer MilesCranmer removed their assignment Apr 20, 2023
@MilesCranmer
Copy link
Owner Author

I've been thinking about doing a full switch to PythonCall.jl to simplify things like this, but it sounds like static Python installs might not be supported?

JuliaPy/PythonCall.jl#318 (comment)

From the logs you've sent, it's a statically linked build of Python which is unfortunately not supported by PythonCall (because it needs to dynamically link to libpython). Often this is the case for Python bundled in system package managers.

@cjdoris is this correct? I'm not sure I understand because I had thought all Python binaries installed by conda were static – but the existence of CondaPkg.jl seems to contradict this

@cjdoris
Copy link

cjdoris commented Jun 22, 2023

Ok, well strictly all PythonCall needs is a shared libpython (i.e. libpython.so or libpython.dll) and the linkage of the python executable is not relevant. But I assume that if a shared libpython is available then python itself is dynamically linked. Perhaps not.

@MilesCranmer
Copy link
Owner Author

It looks like conda packages libpython3.so so even though it's a static python executable, the libpython is shared. If I understand this correctly. Are you able to install PythonCall.jl as a dependency of conda environments, and use the Python+Julia versions packaged by conda? If so, we should be good to go in terms of making a port of PySR.

@MilesCranmer
Copy link
Owner Author

Fixed by #535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: mid
Projects
None yet
Development

No branches or pull requests

3 participants