[ANN] jill.py -- a simple and stupid cross-platform Julia installer

The python fork jill.py is a cross-platform Julia installer that provides more functionalities than the original bash script made by @abelsiqueira :

  • download the latest Julia release from the nearest mirror server
  • keep the same simple and stupid Julia installation experience across all platforms

As long as you have python >= 3.6 installed LOL, you can install jill using pip install jill

And then use some commands that I like the most:

  • jill install: install the latest stable Julia version (Currently it’s 1.3.1 and not 1.4.0-rc1)
  • jill install 1.0: install the latest stable 1.0.z Julia version (Currently it’s 1.0.5)
  • jill install 1.4.0-rc1 --upgrade: install 1.4.0-rc1 and copy the root environment from an older Julia version.
  • jill install --upstream Official: only download from the official julialang-s3 buckets
  • cron + sudo jill install nightly --confirm: always keep an updated nightly version system-widely

Although not documented well, one advanced usage of jill I love so much is to deploy CI by targeting download upstream to your private release mirror, where external network traffic is usually limited. (For me it simply because network connection to aws s3 from China really sucks)

Also for who wants to use it in a CI environment: you’re always guaranteed to get an updated release version as soon as there’s a new Julia release.

A brief demo:

A great help comes from @staticfloat when I tried to add Windows support, all credits goes to him and bugs are my own.

20 Likes

Nice!
I am using Ubuntu 18.04.
Where does your script modify the PATH variable?
Couldn’t find any change to .bashrc

1 Like

Where does your script modify the PATH variable?
Couldn’t find any change to .bashrc

It’s supposed to be ~/.bashrc if you’re non-root user and if ~/.local/bin not in PATH.

# a snapshot of the install log
add /home/test/.local/bin to PATH
~/.bashrc will be modified, if you're not using BASH, then you'll need manually add /home/test/.local/bin to your PATH

/home/test/.bashrc is modified
you need to restart your current shell to update PATH

Looks great!

@tkf could this be integrated into pyjulia?

2 Likes

@JohnnyChen94 I started using this, and it seems to work fine!

I’ve two questions. What are the correct procedures to update a Julia version, and to delete a Julia version?

If you mean updating Julia’s minor version, say, jill install 1.7.0-rc1, then you probably would want to cp -r ~/.julia/environments/v1.6 ~/.julia/environments/v1.7 (if you’re using macOS or Linux) so that the package information is still kept in the new version’s root environment @v1.7. Actually, jill install 1.7.0-rc1 --update also does this but I find manually copying the folder via cp is more convenient so I choose to not advertise this feature in the README.

Deleting Julia via jill is a missing feature: currently, you’ll have to manually remove the Julia installation folders and also the symlinks, see also the discussions in https://github.com/johnnychen94/jill.py/issues/96.

1 Like

Close, but not quite… By updating I meant that it’d update from 1.6.3 to 1.6.4 for instance. Well, I guess the default version would also need to update from 1.6 to 1.7 when it’s released. I don’t care about the version specific files, and changing from 1.6 to 1.7 would probably be a good time for me to clean up with rm -rf ~/.Julia/.

Ah, ok, I can delete some versions manually.

Nice! I’ve seen also the project juliaup which I think works also on this question

For this then it’s just jill install --confirm and done. jill doesn’t distinguish between patch versions.

1 Like

On linux with bash shell, because bash caches paths to executables, a command like hash -d julia is needed to access the newly installed version. (Doesn’t apply if current shell hasn’t yet ref’d julia, or if you start a new shell, etc.). Eg:

> julia --version
julia version 1.7.0-rc2
> jill install
   ...(jill installs 1.7.2)...
> julia --version
julia version 1.7.0-rc2
> hash -d julia
> julia --version
julia version 1.7.2
1 Like