From 9ae0826078a19ff416763dc4dc97cc8e4f4a8a96 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Wed, 22 May 2024 15:40:27 +1200 Subject: [PATCH] simplify julia install instructions --- FIRST_STEPS.md | 51 +++++++++---------------------------------------- INSTALLATION.md | 23 +++++++++++++++++----- README.md | 5 ++--- 3 files changed, 29 insertions(+), 50 deletions(-) diff --git a/FIRST_STEPS.md b/FIRST_STEPS.md index 40b8d98..0edce28 100644 --- a/FIRST_STEPS.md +++ b/FIRST_STEPS.md @@ -1,51 +1,18 @@ # Installing Julia -**Important** When following the following **four steps**, be sure the version -of Julia you install is **version 1.10.x**, where **x** is any integer. +Follow these **four** steps to install Julia on your computer: -While Julia can be run in the cloud (see e.g., -[here](https://juliahub.com/ui/Home)) we recommend installing Julia on -your machine when starting out: +1. If you are a Windows user, install [Windows Terminal](https://aka.ms/terminal) and make + sure you know how to open a new terminal process (window), into which you can type + commands. If the link doesn't work, try a different browser. -1. If you are a Windows user, install [Windows - Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-nz&gl=nz) - and make sure you know how to open a new terminal process, into which you can type - commands. - -2. Install the julia compiler: +2. Follow [these official installation instructions](https://julialang.org/downloads/). - - Mac: Download the appropriate the file ending in `.dmg` appropriate to your processor - and follow [these instructions](https://julialang.org/downloads/platform/#macos). - - - Ubuntu and other Linux distributions: Follow [these - instructions](https://ferrolho.github.io/blog/2019-01-26/how-to-install-julia-on-ubuntu) - **but replace "1.8" with "1.9", and "1.8.5" with "1.9.0"** in all commands (unless - this has already been updated in the post). - - - Windows: Follow [these instructions](https://julialang.org/downloads/platform/#windows) (video below) - - **It is very strongly recommended that you add `julia` to your `PATH`**, as described in - the instructions, so that Julia can be launched from a terminal/console. (On a Mac, - double clicking on the Julia application icon will also do.) - -
- -
- - An new alternative I have not tried or tested myself is to use - [juliaup](https://github.com/JuliaLang/juliaup). - -3. Open the downloaded application in the usual way for your OS, or - type `julia` and press `return` from a terminal window. This launches a command-line - interface for interacting with julia called the +3. Open a terminal window and type `julia`, and press `RETURN` or `ENTER`. This + launches a command-line interface for interacting with julia called the [REPL](https://en.wikipedia.org/wiki/Read–eval–print_loop). -4. *Testing.* At the `julia> ` prompt, type `println("Hello - world!")` and press `enter`. The words "Hello world!" should be repeated back to you: +4. *Testing.* At the `julia> ` prompt, type `println("Hello world!")` and press `RETURN` + or `ENTER`. The words "Hello world!" should be repeated back to you: ![Julia REPL screen shot](/assets/hello_world.png) - -*Known issue*: If launching Julia on a Mac by clicking on the app icon, you may encounter -"Error: Not authorised to send Apple events to Terminal." Workaround: See [this -fix](https://apple.stackexchange.com/questions/393096/error-not-authorised-to-send-apple-events-to-terminal-when-starting-maxima) -or add `julia` to your `PATH` so you can launch Julia from the terminal . diff --git a/INSTALLATION.md b/INSTALLATION.md index 3c0db8c..0992e0c 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -17,7 +17,7 @@ The following instructions only need to be executed successfully once: - [Install a correct version of the Julia compiler](FIRST_STEPS.md). -- **In a new Julia session** type the following at the `julia>` prompt: +- **In a new Julia session** type the following at the `julia>` prompt, inlcuding a RETURN at the end of each line (or do copy/paste + one final RETURN): ```julia ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0 @@ -30,11 +30,16 @@ Pkg.build("Conda") Pkg.build("IJulia") ENV["JULIA_PKG_PRECOMPILE_AUTO"]=1 +using HelloJulia using Pkg Pkg.test("HelloJulia") exit() ``` +**IF YOU ARE PREPARING FOR A JULIA WORKSHOP** you can stop now. You're ready for the +workshop! + + ## Running the demos and tutorials !!! Note @@ -42,11 +47,11 @@ exit() Running notebooks for the first time may involve delays due to precompilation of newly installed packages. -After starting a new Julia session, do this: +After starting a new Julia session, enter these commands: ```julia -julia> using Pkg; Pkg.activate(joinpath(Pkg.devdir(), "HelloJulia")) -julia> using HelloJulia +using Pkg; Pkg.activate(joinpath(Pkg.devdir(), "HelloJulia")) +using HelloJulia ``` Then: @@ -55,14 +60,22 @@ Then: - Enter `pluto()` at the `julia>` prompt. +To kill the notebook server when finished, navigate to the window running Julia and enter +CONTROL-C. + ### Option 2: To run as Jupyter notebooks -- Enter `juptyer()` at the `julia>` prompt. +- Enter `juptyer()` at the `julia>` prompt. If asked, agree to install Jupyter using + Conda. - In the browser window that should appear, navigate to the folder of interest - Choose the file called `notebook.unexecuted.ipynb` (or `notebook.ipynb` to see pre-executed version) + +To kill the notebook server when finished, navigate to the window running Julia and enter +CONTROL-C. + ### Option 3: To run as script in your editor diff --git a/README.md b/README.md index 5dab62a..27cf023 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ ## ✨ Participating in ResBaz 2024? -Start -[here](https://github.com/ablaom/HelloJulia.jl/wiki/Preparing-for-your-ResBaz-2024-Julia-workshop) -for the **Getting Started With the Julia Programming Language** workshop. +Start [here](INSTALLATION.md) for the **Getting Started With the Julia Programming +Language** workshop. ---