pyjuliapkg icon indicating copy to clipboard operation
pyjuliapkg copied to clipboard

check if `juliaup` is update to date

Open Roger-luo opened this issue 3 years ago • 3 comments

should check or just run juliaup self upgrade before juliaup add <julia version>, otherwise we will end up in this error

(base) ➜  python git:(roger/python) ✗ juliaup add 1.7.3
Error: '1.7.3' is not a valid Julia version or channel name.

because my local juliaup was not updated after 1.7.3 was released

Roger-luo avatar May 26 '22 18:05 Roger-luo

Or maybe should set upgrade to False by default?

https://github.com/cjdoris/pyjuliapkg/blob/main/src/juliapkg/deps.py#L240

Roger-luo avatar May 26 '22 18:05 Roger-luo

Yeah I've had the same issue. For me, juliaup self upgrade didn't do anything, and I can't install the newest JuliaUp through the Windows App Store either, but assuming that's supposed to work, it's probably a good thing to do.

I've added a graceful fallback though: if JuliaUp tries to install Julia and fails like this, it will now just show a warning, then try to find a compatible version of Julia in the PATH (since you probably have 1.7.2 already) like it would if you didn't have JuliaUp at all. I've released a version with this in.

cjdoris avatar May 27 '22 01:05 cjdoris

FYI the behaviour here has changed a little recently. Now if you have JuliaUp installed, JuliaPkg will select the version to install from the list of available versions given by juliaup list. So if the user has not updated JuliaUp yet, they may get an older (but still compatible) version of Julia.

This fixes the above problem, and the user can update JuliaUp of their own accord - updating JuliaUp itself seems beyond the scope of this package.

I think this is the best behaviour. Any thoughts? If not, I'll close the issue.

cjdoris avatar Aug 06 '22 12:08 cjdoris