Giter Club home page Giter Club logo

juliaup's Introduction

Juliaup - Julia version manager

This repository contains a cross-platform installer for the Julia programming language.

The installer also bundles a full Julia version manager called juliaup. One can use juliaup to install specific Julia versions, it alerts users when new Julia versions are released and provides a convenient Julia release channel abstraction.

Status

This installer is considered production ready.

Installation

On all platforms it is recommended that you first uninstall any previous Julia versions and undo any modifications you might have made to put julia on the PATH before you install Julia with the installer in this repository.

Windows

On Windows Julia and Juliaup can be installed directly from the Windows store here. One can also install exactly the same version by executing

winget install julia -s msstore

on a command line.

If the Windows Store is blocked on a system, we have an alternative MSIX App Installer based setup. Note that this is currently experimental, please report back successes and failures here. To use the App Installer version, download this file and open it by double clicking on it.

If neither the Windows Store nor the App Installer version work on your Windows system, you can also use a MSI based installer. Note that this installation methods comes with serious limitations and is generally not recommended unless no other method works. For example, there is no automatic update mechanism for Juliaup with this installation method. The 64 bit version of the MSI installer can be downloaded from here and the 32 bit version from here. By default the install will be a per-user install that does not require elevation. You can also do a system install by running the following command from a shell:

msiexec /i <PATH_TO_JULIA_MSI> ALLUSERS=1

Mac and Linux

Juliaup can be installed on Linux or Mac by executing

curl -fsSL https://install.julialang.org | sh

in a shell.

Command line arguments

One can pass various command line arguments to the Julia installer. The syntax for installer arguments is

curl -fsSL https://install.julialang.org | sh -s -- <ARGS>

Here <ARGS> should be replaced with one or more of the following arguments:

  • --yes (or -y): Run the installer in a non-interactive mode. All configuration values use their default.
  • --default-channel <NAME>: Configure the default channel. For example --default-channel lts would install the lts channel and configure it as the default.
  • --path (or -p): Install juliaup in a custom location.

Software Repositories

Important note: As of now, we strongly recommend to install Juliaup via the Windows Store or curl command above rather than through OS-specific software repositories (see below) as the Juliaup variants provided by the latter currently have some drawbacks (that we hope to lift in the future).

brew install juliaup

On Arch Linux, Juliaup is available in the Arch User Repository (AUR).

On openSUSE Tumbleweed, Juliaup is available. To install, run with root privileges:

zypper install juliaup

On Solus, Juliaup is available. To install, run with root privileges:

eopkg install juliaup

To install via Rust's cargo, run:

cargo install juliaup

Continuous Integration (CI)

If you use GitHub Actions as your CI provider, you can use the julia-actions/install-juliaup action to install Juliaup in CI.

Using Juliaup

Once you have installed Juliaup, julia is on the PATH, and on Windows 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.

Here are some of the things you can do with juliaup:

  • juliaup list lists all the available channels.
  • juliaup update installs the latest available Julia version for all your channels.
  • juliaup update release updates the release channel to the latest version.
  • juliaup status shows you which Julia versions you have installed and which one is configured as the default.
  • juliaup add 1.5.1 adds Julia 1.5.1 to your system (it can then be launched via the command julia +1.5.1).
  • juliaup default 1.5.3 configures the julia command to start Julia 1.5.3.
  • juliaup default 1.6 configures the julia command to start the latest 1.6.x version of Julia you have installed on your system (and inform you if there is a newer version in 1.6.x available).
  • juliaup default release configures the julia command to start the latest stable version of Julia (this is also the default value).
  • juliaup remove 1.5.3 deletes Julia 1.5.3 from your system.
  • juliaup add 1.6.1~x86 installs the 32 bit version of Julia 1.6.1 on your system.
  • juliaup default 1.6~x86 configures the julia command to start the latest 1.6.x 32 bit version of Julia you have installed on your system.
  • juliaup link dev ~/juliasrc/julia configures the dev channel to use a binary that you provide that is located at ~/juliasrc/julia. You can then use dev as if it was a system provided channel, i.e. make it the default or use it with the + version selector. You can use other names than dev and link as many versions into juliaup as you want.
  • juliaup self update installs the latest version, which is necessary if new releases reach the beta channel, etc.
  • juliaup self uninstall uninstalls Juliaup. Note that on some platforms this command is not available, in those situations one should use platform specific methods to uninstall Juliaup.
  • juliaup override status shows all configured directory overrides.
  • juliaup override set lts sets a directory override for the current working directory to the lts channel.
  • juliaup override unset removes a directory override for the current working directory.
  • juliaup override set --path foo/bar lts sets a directory override for the path foo/bar to the lts channel.
  • juliaup override unset --path foo/bar removes a directory override for the path foo/bar.
  • juliaup override unset --nonexistent removes all directory overrides for paths that no longer exist.
  • juliaup completions bash > ~/.local/share/bash-completion/completions/juliaup generates Bash completions for juliaup and saves them to a file. To use them, simply source this file in your ~/.bashrc. Other supported shells are zsh, fish, elvish and powershell.
  • juliaup shows you what other commands are available.

The available system provided channels are:

  • release: always points to the latest stable version.
  • lts: always points to the latest long term supported version.
  • alpha: always points to the latest alpha version if one exists. If a newer beta or release candidate exists, it will point to that, and if there is no alpha, beta, or rc candidate available it will point to the same version as the release channel.
  • beta: always points to the latest beta version if one exists. If a newer release candidate exists, it will point to that, and if there is neither a beta or rc candidate available it will point to the same version as the release channel.
  • rc: same as beta, but only starts with release candidate versions.
  • nightly: always points to the latest build from the master branch in the Julia repository.
  • pr{number} (e.g. pr123): points to the latest successful build of a PR branch (https://github.com/JuliaLang/julia/pull/{number}). Only available if CI has recently and successfully built Julia on that branch.
  • specific versions, e.g. 1.5.4.
  • minor version channels, e.g. 1.5.
  • major version channels, e.g. 1.

All of these channels can be combined with the ~x86, ~x64 or ~aarch64 suffix to download a specific platform version.

Using installed Julia versions

To launch the default Julia version simply run julia in your terminal.

To launch a specific Julia version, say in channel release, run julia +release.

Overrides

The Julia launcher julia automatically determines which specific version of Julia to launch. There are several ways to control and override which Juliaup channel should be used:

  1. A command line Julia version specifier, such as julia +release.
  2. The JULIAUP_CHANNEL environment variable.
  3. A directory override, set with the juliaup override set command.
  4. The default Juliaup channel.

The channel is used in the order listed above, using the first available option.

Path used by Juliaup

Juliaup will by default use the Julia depot at ~/.julia to store Julia versions and configuration files. This can be changed by setting the JULIAUP_DEPOT_PATH environment variable. Caution: Previous versions of Juliaup used the content of the environment variable JULIA_DEPOT_PATH to locate Juliaup files, the current version changed this behavior and no longer depends on JULIA_DEPOT_PATH.

Juliaup server

Juliaup by default downloads julia binary tarballs from the official server "https://julialang-s3.julialang.org". If requested, the environment variable JULIAUP_SERVER can be used to tell Juliaup to use a third-party mirror server.

Development guides

For juliaup developers, information on how to build juliaup locally, update julia versions, and release updates can be found in the wiki https://github.com/JuliaLang/juliaup/wiki

To use unstable preview versions of juliaup (e.g. to get a patch before it makes it into the latest release), use

curl -fsSL https://install.julialang.org/releasepreview | sh

More information

This JuliaCon 2021 talk is a short introduction to Juliaup. Note that the video was recorded before the Linux and Mac versions were finished, but all the information about juliaup itself applies equally on Linux and Mac.

This JuliaCon 2022 talk provides some background on the design of Juliaup.

juliaup's People

Contributors

alecloudenback avatar aramirezreyes avatar ararslan avatar boostcookie avatar davidanthoff avatar dependabot[bot] avatar devmotion avatar dilumaluthge avatar evetion avatar fingolfin avatar gambitier avatar github-actions[bot] avatar gunnarfarneback avatar heetbeet avatar ianbutterworth avatar jakobnissen avatar jblaschke avatar johnnychen94 avatar kristofferc avatar lilithhafner avatar maleadt avatar milescranmer avatar poorpocketsmcnewhold avatar roger-luo avatar simeonschaub avatar stefankarpinski avatar t-bltg avatar tedbyron avatar uncomfyhalomacro avatar wolthom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

juliaup's Issues

Updates only work after system restart

There is a bug in the currently shipping version of AppInstaller that means any update to the package will only be installed after a system restart... MS is aware of this bug and as far as I can tell trying to fix this, but it is unclear to me how fast a bug fix would ship broadly across Windows versions.

The easiest way around this would be to go to a Windows Store submission right away: it doesn't use AppInstaller, so that problem would just not be there.

Update artwork

We need to get high-quality assets (images etc) both for the MSIX installer and the store listing.

Add ability to update all channels

At the moment we only support juliaup update to update the current default channel. It would be nice if one could also do juliaup update <channelname> to update some other channels. This is now implemented.

We could also support juliaup update --all to update all channels. That would require us to keep a list of "installed" channels, though, which is a concept we don't have at the moment.

Take JULIA_DEPOT_PATH into account

At the moment everything is hard coded to store Julia versions in ~/.julia/juliaup. We should change that to check whether JULIA_DEPOT_PATH is configured and then use the value there if present.

Fix formatting of `juliaup status`

Currently it shows things in a weird format, we should make it display things in the same what that one would specify things in setdefault. That requires in particular a change in how we display x86.

Handle environments when upgrading across a minor version bump

This suggestion comes from here.

I think one option would be that if juliaup update detects an update that increases the minor version of Julia, that it copies the older environment file to the new Julia minor version. I think I would limit it to this scenario, i.e. not do anything with downgrades or stuff like that.

One question is whether just copying the env is actually a good user experience? Or would we have to instantiate, build or do other things as well?

Figure out CI story

I'm thinking Azure pipelines with approvals for specific environments, similar to what we have for the VS Code extension.

Explore linux

Maybe one could actually make something like sudo apt install julia install a packaged version of the launcher from this repo here and juliaup...

Idea: show that user can run `juliaup` from within Julia

One thing that a user might stumble on is how to run juliaup commands without having to launch a new command window. They may not realize shell commands can by run from within Julia.

So something like (paraphrased message):

Julia version 1.6.1 is available. Run:

  juliaup update

to install Julia 1, the latest Julia version for the current channel.

This command may be run within Julia by typing a semicolon (;) to access the shell prompt.

Not clear enough update message

In playing a more naive user, I did the following when the program first lanuched:

The latest version of Julia in the 1 channel is Julia 1.6.1. You currently have Julia 1.5.3 installed. Run:

  juliaup update

to install Julia 1.6.1 and update your current channel to that version.
┌ Warning: Expected non-existent C:\Users\densb\AppData\Local\Programs\Julia 1.5.3\share\julia to be your Julia directory.
│ Certain functionality will be disabled.
│ To fix this, try deleting Revise's cache files in ~/.julia/compiled/v1.5/Revise, then restart Julia and load Revise.
│ If this doesn't fix the problem, please report an issue at https://github.com/timholy/Revise.jl/issues.
└ @ Revise C:\Users\densb\.julia\packages\Revise\VxkZO\src\packagedef.jl:1311
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> juliaup update
ERROR: syntax: extra token "update" after end of expression
Stacktrace:
 [1] top-level scope at none:1

The message should be more clear on the fact that this command should be put into the run window, or directly into a command prompt. I imagine that the uses who install julia with the app store will be the least technically savvy, so I think this is needed.

Add a command line flag to specify a Julia version

Right now one can only configure a default Julia version via juliaup setdefault 1.4.2. It would be nice if one could also start a specific Julia version without changing the default configuration.

One option might be julia --version=1.4.2, i.e. we would "overload" the --version command line argument so that if one specifies a version, it will start that specific version.

Clean up the C++ code

I'm mixing lots of different styles, nothings is structured very well, lots of code duplication etc. It all works, but it is a bit of a mess...

Start specific Julia version if it is specified in Project.toml/Manifest.toml

This is probably a bit speculative at this point, but it would be fairly simply to look at a Project.toml/Manifest.toml if one is specified via the --project command line arguments and see whether these specify a specific Julia version. If they do, run things in that specific version.

Of course, right now there is no official way to specify a Julia version in a Manifest.toml. For Project.toml, the situation is a bit different: at least for packages one can specify a version in the compat section. The mybinder integration for example looks for a julia entry in the compat section to decide what Julia version to use. We could do something similar, for example if there was an entry julia = "=1.3.1" in the Project.toml, we could start Julia 1.3.1.

But maybe this should also just wait until there is an official way to record Julia versions in Manifest.toml files.

Add more channels

At the moment we only have numbered channels, like 1 and 1.6. We could add additional channels latest, lts and nightly (maybe).

Add support for 32 bit builds

The idea would be that if one is on a 64 bit system, 1.4.2 points to the 64 bit version, and 1.4.2-x86 to the 32 bit version. On a 32 bit system 1.4.2 would point to the 32 bit version.

So in general, a version or channel name without a platform specifier refers to the platform that one is running on, and then there are other variants that one can also install that have a platform specifier added.

Sys.BINDIR returns an inaccessible path

The Julia app is installed into the folder C:\Program Files\WindowsApps\Julia-1.4.2_1.0.0.0_x64__m018azp39xxy8 by the MSIX engine, and so Sys.BINDIR returns C:\Program Files\WindowsApps\Julia-1.4.2_1.0.0.0_x64__m018azp39xxy8\Julia\bin. That folder, though, is inaccessible to any application other than Julia itself (or rather any other binary that is not part of the Julia MSIX installer). So if from within Julia one tries to start C:\Program Files\WindowsApps\Julia-1.4.2_1.0.0.0_x64__m018azp39xxy8\Julia\bin\julia.exe it works, but if I try to run that from say a shell or some third party application, it won't work.

One example of a program where this leads to a problem right now is the VS Code extension (*).

The MSIX installer also adds a symbolic link (I think) for julia.exe to ~\AppData\Local\Microsoft\WindowsApps, and that is the path one should use to start Julia from outside Julia itself, say from VS Code.

I think fixing this might require some fiddling, but it doesn't look impossible to me.

(*) I do have a fix for the VS Code extension that is simply and easy, just can't merge it right now because we are in feature freeze for Juliacon for the extension.

Add a GUI application for Julia version management

We could also add a GUI application named Juliaup or Julia Configuration or something like that. This would appear in the Start menu and would show a list of all channels on the system, which ones are out-of-date, with a button to update individual or all channels.

Add update config per channel

At the moment we can't configure the update behavior of individual channels. Instead, whenever a channel is outdated, it will show a reminder to update the channel.

Instead, we might want to add configuration per channel, a la auto (automatically update the channel), prompt (prompt for updating a channel when there is a new version), remind (just remind that there is an update, without UI to update, that is what we have at the moment) and never (just don't bug a user with any update info).

IJulia is broken

The current version breaks IJulia. The reason is this: any app installed with an MSIX installer runs in a container, and in that container %APPDATA% and the registry is virtualized away, so that these become per-app state that is not shared with any other app (the situation is slightly more nuanced than this, but for our case this is an accurate enough description. See here for the full description). When IJulia.jl writes the kernel information into %APPDATA%\jupyter it succeeds, but those files are not visible to any other application than Julia itself. In particular, these files are not visible to Jupyter or Python, and then nothing works.

I've picked IJulia.jl as the example here, but this might be a problem for other packages as well: if they write state into %APPDATA% and then rely on other applications to read that state, things won't work.

I consider the IJulia.jl case a showstopper: we obviously need to find some solution to that before we can even consider going forward with the MSIX installer.

Right now I can think of two solutions:

  1. We convince the Jupyter project to use different file system locations for configuration files (jupyter/jupyter_client#544). I think that would in general be a good idea, because the Windows Store distributed version of Python seems to be running into similar issues, and any other kernel that wants to ship via the Windows Store would also face the same problem. I think medium to long term, %APPDATA% just doesn't seem to be a great place to share cross-application configuration. Having said that, any such change would take a long time to make its way through the Jupyter ecosystem, so I'm not really convinced this would allow us to use an MSIX installer anytime soon.
  2. We try to convince MS to give us unvirtualizedResources capabilities for a potential Windows Store submission. This would solve the problem entirely: it would just switch off the virtualization of the %APPDATA% folder for Julia, problem solved. I'm fairly optimistic that this might work: Python has that capability for its Windows Store submission as well, and in general we seem to have a good reason for asking for it. This would also solve any problems that other packages might have around %APPDATA% configuration settings. This strategy will not work for any pre Store AppInstaller based solutions, as far as I can tell there is no way to install a MSIX package via AppInstaller with that capability.

Provide options to delete old Julia versions

Generally it would be nice if juliaup tried slightly more aggressively to uninstall/delete old Julia versions. Some ideas:

  1. juliaup update could remove the old Julia version after the update, if that old version is not used by any other channel that the user has used and was not explicitly installed. This would require us to track more information about the reasons why a given Julia version is present on a user system in juliaup.toml.
  2. We could add a garbage collect feature to juliaup that has some heuristic for deleting old Julia versions.

Updated Store app won't launch

Something broke. I had the first release from the store that you posted on Slack, then just updated it with your new post, and now it won't launch. A console window very briefly flashes up then disappears.

I had the previous one running while updating.

Channel name is "1"

The message on starting julia after getting it from the store is

The latest version of Julia in the 1 channel is Julia 1.6.1

The channel name should probably be changed to release or something like that?

Add Julia 1.0.0-1.5.0

Right now this only supports Julia 1.4.x. We should add support for all previous Julia versions.

I tried this already but ran into some problems, in particular I was not able to compile any Julia version pre 1.4.0 on my build machine.

julia.exe not located automatically by VSCode

The order of thing:

  • I had julia installed, and the bin/julia.exe manually typed into the settings for the julia extension for VSCode
  • I uninstalled julia with chocolatey, but kept my .julia folder
  • I checked that julia was removed from path - it was
  • I installed julia via the microsoft store - worked great
  • Checked that julia was in my path - it was
  • I updated to 1.6.1 with juliaup update from a terminal
  • I opened up a .jl script in VSCode

At this point I am notified that VSCode has actually NOT updated the location of the julia.exe. I was able to find it in C:\Users\densb\AppData\Local\Microsoft\WindowsApps\JuliaComputingInc.Julia_b0ra4bp6jsp6c, and manually type that is as the location of the excecutable in the settings for the julia extension for VSCode.

This was suppoed to be automated, right?

Don't set ACLs on extracted files

The extracted files from the Julia archive should just inherit permissions, but Tar.jl changes all the permissions on all the files.

Reenable juliaup add

We can probably use the native UWP download API, but still need some way to unzip or untar the archives we are going to download.

Error message disappears too quickly

I deleted all files in juliaup, then from the command prompt, then ran julia.

No Julia version for channel 1 is installed on this system. Run:

  juliaup update

to install Julia 1, the latest Julia version for the current channel.

Windows console windows are closed as soon as their program exits. I suggest adding a "press any key to exit" read prompt to ensure the window stays open so the message can be read.

Originally posted by @BioTurboNick in #36 (comment)

Ship JuliaMono font

Should we? Not sure, because Windows Terminal for example has pretty nice new default fonts. But we should investigate. I think technically this might actually be fairly simple because MSIX does support font install, AFAIK.

Remove more stuff at uninstall

If we could get the customInstallActions permission for our store submission, we could use this to remove arbitrary stuff at uninstall, for example all the Julia versions that were installed with juliaup.

In my mind this would make most sense as part of a more generic redesign of storage locations. At the moment, a Julia depot is really a mix of stuff that in an ideal world would automatically be uninstalled when Julia is uninstalled, and stuff that should stay around even after Julia is uninstalled. In particular, it seems to me that in an ideal world, the following things would all be uninstalled with Julia itself: ~/.julia/packages, ~/.julia/compiled, ~/.julia/registries (at least if they are really, truly read-only cache copies from a server), ~/.julia/artifacts and ~/.julia/juliaup. I think ideally all those things would actually no longer be stored in ~/.julia, but instead in say %APPDATA%/Julia, and then that folder gets removed at uninstall. The principle then would be that everything in ~/.julia stays around at uninstall, but we have a new location for files that get removed when Julia is uninstalled. At some level this would be a split of the Julia depot system into two different kinds of files.

I think at the end of the day this change would have to happen in Julia itself first.

Port to Mac

In an ideal world we could create a Mac app store submission that ships the launcher and juliaup and have everything work on Mac as well.

The launcher is just a small C++ program that probably could be made cross-platform fairly easily. Juliaup is written in Julia in any case.

Main question is to figure out how one can package something as a Mac app store submission, really.

Move default configuration to configuration file

At the moment we store the default Julia version as a UWP configuration property. That is very Windows specific and doesn't really buy us anything, so it would probably make more sense to store this (and other config options) in a file ~/.julia/juliaup/juliaup.toml or something like that.

Add channels

Right now one can pick a Julia version specifically by giving a full version number. For example, one can configure the default Julia version to be 1.4.2. We should add "channels" as alternative ways to pick a Julia version.

Useful channels could be 1.2 (=latest build in the 1.2 series), 1 (=latest build in the 1 series), latest (=latest released version), lts (=latest LTS release) and maybe nightly (=latest nightly build).

One could then specify a channel as a choice, for example one could run juliaup setdefault 1.4 to make the 1.4 channel the default that gets invoked with julia.

For each channel, we would want a user changeable configuration that specifies how this channel will update. Useful values might be auto (always automatically update to the current build in this channel), prompt (prompt the user when a new version is available in that channel to update) and never (don't even tell the user about any new versions in the channel).

A good default out-of-the-box configuration might be latest as the default channel, with an update setting of prompt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.