I used to install Julia manually using DMG file on my M2 Mac and I used rosetta2 to emulate X86 on my macbook.
Lately I switch to
Apple Silicon Code
Juliaup
I did it by removing all traces of ~/.julia and the old x86 julia applications and all my symbolic links to my julia applications
and install juliaup according to the instructions on juliaup webpage.
Now I can really appreciate the juliaup MAGIC.
$ pwd
/Users/ssiew/juliascript/PlotExamples
$ juliaup add 1.11
Installing Julia 1.11.0+0.aarch64.apple.darwin14
Checking standard library notarization............................................................done.
$ juliaup default 1.11
Configured the default Julia version to be '1.11'.
Apparently I donāt even need ājuliaup add 1.11ā
I could have just done ājuliaup updateā as I discovered below
$ juliaup status
Default Channel Version Update
--------------------------------------------------------------------------------------------------------
* 1.11 1.11.0+0.aarch64.apple.darwin14
release 1.10.5+0.aarch64.apple.darwin14 Update to 1.11.0+0.aarch64.apple.darwin14 available
$ juliaup update
$ juliaup status
Default Channel Version Update
-----------------------------------------------------------
* 1.11 1.11.0+0.aarch64.apple.darwin14
release 1.11.0+0.aarch64.apple.darwin14
$ juliaup default release
Configured the default Julia version to be 'release'.
$ juliaup status
Default Channel Version Update
-----------------------------------------------------------
1.11 1.11.0+0.aarch64.apple.darwin14
* release 1.11.0+0.aarch64.apple.darwin14
$ juliaup remove 1.11
Deleting symlink julia-1.11.
Julia '1.11' successfully removed.
$ juliaup status
Default Channel Version Update
-----------------------------------------------------------
* release 1.11.0+0.aarch64.apple.darwin14
If you donāt need to use 1.10 for some projects, then you can just use release which happens to be 1.11 at the moment.
On the other hand, if you use lts, you will find it pointing to 1.10
Personally I still canāt find the utility of juliaup on Linux/Macā¦ using symlinks it works perfectly, it is super easy and you know what you are doingā¦ I have ~/bin/julia symlinked to ~/bin/julia1.11 in turn symlinked to ~/lib/julia-1..... and so for julia1.10, 1.9, etcā¦
I used to have a similar setup before starting to use juliaup and it worked fine. What made the difference for me was that the trivial steps of downloading a release, unpacking it, and symlinking it was enough friction that I tended to skip patch releases and delay minor releases for weeks to months. I have found juliaup update or juliaup add to be so much more ergonomic.
Do you have to do it only once? So this is saved somewhere and the next time you use julia in that specific project directory (or using VSCode ) it defaults to that specific version ?
Yes. And you can use specifiers like lts or release or 1.10 or 1.10.2, many options. I did not try it with the VSCode Julia console yet, because even in VSCode I just use the normal bash terminal.
And a tutorial in juliaup.jl webpage on how to use ājulia overrideā
currently it says
QUOTE
juliaup override set lts sets a directory override for the current working directory to the lts channel.
UNQUOTE
it should say
cd /home/johnsmith/juliadir/myprojectA
juliaup override set 1.10
This would mean that juliaup uses julia version 1.10 for lines like
ājulia --project=/home/johnsmith/juliadir/myprojectA juliaprogramA.jlā
will use julia version 1.10 to run juliaprogramA.jl
Something magic that would be nice: automatically ensure that a defined set of packages (Revise, Infiltrator, BenchmarkTools, IJulia, etc) is available in every base environment, and that
IJulia.installkernel("Julia", "--project=@.")
is called if the kernel doesnāt already exist.
Is there a trick to ensure that kind of initialization for every new minor version, right now?
The magic Iām working on is more around ājust gettingā the right per-project Julia version without having to mess with per-directory overrides etc.
Note that while these packages are very useful for a particular purpose, not all of them are universally used (eg those who donāt use notebooks donāt use IJulia).
I would stop using juliaup if it started adding packages I do not need.
Oh, I donāt want it to do this out if the box. This should definitely be customizable. Iād probably just want to be able to have a file juliaup_init.jl or something that juliaup executes whenever it installs a new minor version. Kinda like startup,jl