JuliaPy / pyjuliapkg

Manage your Julia dependencies from Python
MIT License
45 stars 12 forks source link

How to force a julia version using juliapkg.json? #13

Closed pauwiersma closed 1 year ago

pauwiersma commented 1 year ago

I'm working in a conda environment and I need julia 1.5. Following the documentation, I ran the following:

>>> juliapkg.require_julia("1.5")
>>> juliapkg.status()
JuliaPkg Status
/home/tesla-k20c/.conda/envs/ewatercycle_spyder/julia_env/pyjuliapkg/juliapkg.json
Not resolved (resolve for more information)
Julia (^1.5)
>>> juliapkg.resolve()
[juliapkg] Locating Julia ^1.6.1
[juliapkg] Using Julia 1.8.5 at /home/tesla-k20c/.conda/envs/ewatercycle_spyder/julia_env/pyjuliapkg/install/bin/julia

How can I specify the julia version exactly, instead of only giving a minimum requirement? And why does it try to locate ^1.6.1 and not ^1.5.1? Thanks!

pauwiersma commented 1 year ago

According to src/juliapkg/compat.py, no prefix is equivalent to ^ and the prefix '=' is supported. The reason why it tries to locate ^1.6.1 is becausejuliapkg.resolve() somehow looks for juliapkg.json in my juliacallpackage. Adjusting it there works.