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

Add juliaup-init installer for Windows, Linux and OSX #143

Merged
merged 14 commits into from
Nov 21, 2021
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,27 @@ The installer also bundles a full Julia version manager called `juliaup`. One ca
## Using Juliaup

If you want to try it, here is what you should do:
- Make sure you don't have any version of Julia on your PATH. `Juliaup` will handle all `PATH` related aspects of your Julia installation.

### Windows Users
Make sure you don't have any version of Julia on your PATH. `Juliaup` will handle all `PATH` related aspects of your Julia installation.

#### Option 1: The Microsoft Store
- Install Julia from the Windows Store [here](https://www.microsoft.com/store/apps/9NJNWW8PVKMN).

Once you have that installed, `julia` is on the `PATH`, there is a start menu shortcut and it will show up as a profile in Windows Terminal. Any of those will start Julia. The VS Code extension will also automatically find this Julia installation.

#### Option 2: User Level Installation Script
- Run `powershell -nop -c iex (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/Julialang/juliaup/master/juliaup-init.sh.cmd')`
or [download and run](https://raw.githubusercontent.com/Julialang/juliaup/master/juliaup-init.sh.cmd) and follow the prompt.
- Note, it's preferable to choose `yes` to _add juliaup.exe and julia.exe to user PATH_. This will allow the VS Code extension and other programs to access `julia`.

### Linux Users
- Run `curl https://raw.githubusercontent.com/Julialang/juliaup/master/juliaup-init.sh.cmd | sh` or [download and run](https://raw.githubusercontent.com/Julialang/juliaup/master/juliaup-init.sh.cmd) to install juliaup.
- Optionally, add the `~/.juliaup/bin` binaries to your `PATH`. Preferably, add symlinks via sudo privileges: `sudo ln "$HOME/.juliaup/bin/juliaup" /usr/local/bin/juliaup -s; sudo ln "$HOME/.juliaup/bin/julialauncher" /usr/local/bin/julia -s`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should recommend linking things in $HOME to things in /usr/local.

  • /usr/local is a system-wide install location
  • $HOME is specific for your user

If there's any other users on the system this won't work well for them as all the files will reside in your specific $HOME directory with your permissions.


A better alternative is to recommend the use of the $HOME/.local/bin directory which is part of the XDG standard:

User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.

Perhaps juliaup itself could be installed into $HOME/.local/bin/juliaup and we could skip the symlinks completely? If that's not possible, we can symlink it in there.

See also https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it's messy symlinking user-level things to system-wide directories. Will think a bit about this... It might be worth asking the user if the path should be appended in ~/.bashrc like conda and rust does is. I have a strange feeling about installing it flat into $HOME/.local/bin/, since I want to be able to delete the whole directory (such as ~/.juliaup/bin) and not have side effects.

Alternatively, add the line `export PATH=$HOME/.juliaup/bin:$PATH` to `~/.profile` (see [this explanation](https://unix.stackexchange.com/a/26059)).
- Run `juliaup` with the commands described below.

### Subcommands
Here are some of the things you can do with `juliaup`:
- `juliaup update` installs the latest availabe Julia version for all your channels.
- `juliaup update release` updates the `release` channel to the latest version.
Expand Down
Loading