-
Notifications
You must be signed in to change notification settings - Fork 197
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
Set JULIA_PROJECT, use Pkg.add once #186
Set JULIA_PROJECT, use Pkg.add once #186
Conversation
PyCall.jl only needs to be installed in the pysr environment.
Thanks! Just to check, this would still allow a user to set a custom |
Just tested it, and it seems to work. Cool! |
Btw, do you know how one could restart PyJulia? Right now (even before this PR), you can't change the environment after the first call to |
Yes. Sorry, I got distracted. Thanks for merging. Overall, this should provide greater flexibility in terms of where PyCall.jl is installed. |
Thanks. Not sure you saw this message, but do know if there is a way to restart PyJulia? Also - I just updated PyPI to 0.10.2 with this merge - so feel free to update the conda-forge PR as it will now have your JULIA_PROJECT change. |
Not really, although you can kind of simulate it using Perhaps you mean changing environment variables such as I recall Jeff Bezanson talking about interactive threads in the State of Julia 2022 talk: |
If it is not too much trouble, could you also create a Github "release" for 0.10.1 and 0.10.2? One future change I am contemplating is whether there should be a |
Done!
I think that is a good idea. For distributed computing I don't think it should be an issue, since the processes are all launched from within Julia, and then activated using the current project. |
Do you know what these errors are caused by? https://github.com/MilesCranmer/PySR/actions/runs/3006737521 It looks like they are new - not sure what from. Specifically they are only on macOS/windows on Julia <= 1.6 |
Those are likely related to my changes. Essentially PyCall has somehow failed to be installed in the current environment or we failed to change environments. |
Could you point me to the code for the tests that are failing? |
I think it's failing at the
|
Here's my guess at the moment. As you found out before, not all of the Julia API recognizes that Some of the implementations then install PyCall in the local folder rather that the shared environment in the depot. But when they try to load PyCall they don't find it in the shared environment. This raises an There is likely something else going on that accounts for the operating system dependence of the issue. |
I see, thanks. So I guess we should add a method to revert to the old |
If I run from julia.core import JuliaInfo
info = JuliaInfo.load() before I set This is to check the version beforehand. Edit: Yep, it seems fine to run this beforehand. |
JULIA_PROJECT
before loading pyjulia so that PyCall.jl can be contained within the pysr environmentPkg.add
in a single step to add both SymbolicRegression.jl and ClusterManagers.jl to the environment at the same timeI likely advised against using the environment variable
JULIA_PROJECT
in the past. However, I think this may be necessary to avoid interference from other projects if installed within the same environment.