Skip to content

Commit

Permalink
Update installation instructions to Julia 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Apr 15, 2024
1 parent e465647 commit c41cd90
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
18 changes: 9 additions & 9 deletions lectures/E1_Installation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ Install Julia [from the Windows store](https://www.microsoft.com/store/apps/9NJN
winget install julia -s msstore
```
#### Setting the default version
For this class, we are going to use Julia 1.8. To set it as the default version on your machine, run
For this class, we are going to use Julia 1.10. To set it as the default version on your machine, run
```bash
juliaup default 1.8
juliaup default 1.10
```
"""

# ╔═╡ 3133b51c-c1c0-43d3-8938-1179e9466e44
tip(
md"If these options don't work out for you, you can also [manually download Julia 1.8](https://julialang.org/downloads/).",
md"If these options don't work out for you, you can also [manually download Julia 1.10](https://julialang.org/downloads/).",
)

# ╔═╡ a619a607-aeb6-4ca1-b380-4cd41c8e6768
Expand All @@ -96,14 +96,14 @@ If your installation was successful, you should be greeted by the Julia Logo and
"""

# ╔═╡ 1af86ae9-22a6-43f0-80b5-b8d6026abb39
warning_box(md"Make sure you are using Julia 1.8!")
warning_box(md"Make sure you are using Julia 1.10!")

# ╔═╡ 7c9f3896-f9d8-477d-8a20-53114f6cc8ff
md"""## Using the package manager
Julia's package manager is called **Pkg**. In the Julia REPL, open the package manager by typing a closing square bracket **`]`**.
The REPL prompt should change from `julia>` to `(@1.8) pkg>`:
The REPL prompt should change from `julia>` to `(@1.10) pkg>`:
![Pkg](https://i.imgur.com/rzH4rbv.png)
Expand All @@ -117,8 +117,8 @@ Markdown.MD(
"Environments:",
[
md"""
The name in parenthesis (here `@v1.8`) is the name of the currently activated environment.
`(@v1.8)` is the global environment of our Julia 1.8 installation.
The name in parenthesis (here `@v1.10`) is the name of the currently activated environment.
`(@v1.10)` is the global environment of our Julia 1.10 installation.
We will learn more about Pkg and environments in a later lecture!
""",
Expand All @@ -130,9 +130,9 @@ Markdown.MD(
md"""## Installing packages
Packages can be added by typing `add PackageName` in the package manager.
For the purpose of this class, we are going to install Pluto in our global `(@v1.8)` environment:
For the purpose of this class, we are going to install Pluto in our global `(@v1.10)` environment:
```
(@v1.8) pkg> add Pluto
(@v1.10) pkg> add Pluto
```
You should see Pkg install Pluto. Note that the package versions in your installation **don't** have to exactly match up with this screenshot:
Expand Down
32 changes: 16 additions & 16 deletions website/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,36 @@ We have already encountered Julia's package manager **Pkg** during the installat
In the Julia REPL, Pkg can be opened by typing a closing square bracket `]`.

Depending on your installed version of Julia, the prompt should change from `julia>`
to `(@1.8) pkg>`:
to `(@1.10) pkg>`:

```julia-repl
julia> # Default Julia-mode. Type ] to enter Pkg-mode.
(@v1.8) pkg> # Prompt changes to indicate Pkg-mode
(@v1.10) pkg> # Prompt changes to indicate Pkg-mode
```

To exit the package-manage mode, press backspace.
The name in parenthesis, here `@v1.8`, is the name of the currently activated environment.
`@v1.8` is the global environment of our Julia 1.8 installation.
The name in parenthesis, here `@v1.10`, is the name of the currently activated environment.
`@v1.10` is the global environment of our Julia 1.10 installation.

By typing `status` in Pkg-mode, we can print a list of installed packages:

```julia-repl
(@v1.8) pkg> status
Status `~/.julia/environments/v1.8/Project.toml`
(@v1.10) pkg> status
Status `~/.julia/environments/v1.10/Project.toml`
[5fb14364] OhMyREPL v0.5.20
[295af30f] Revise v3.5.2
```

In my case, two packages are installed in the `@v1.8` environment.
In my case, two packages are installed in the `@v1.10` environment.

Let's take a look at the indicated folder `~/.julia/environments/v1.8`
Let's take a look at the indicated folder `~/.julia/environments/v1.10`
in a new shell session.
It contains two files: a `Project.toml` and a `Manifest.toml`.

```bash
$ cd ~/.julia/environments/v1.8
$ cd ~/.julia/environments/v1.10

$ ls
Manifest.toml Project.toml
Expand Down Expand Up @@ -143,22 +143,22 @@ To create a new environment, enter Pkg-mode in the Julia REPL and type `activate
followed by the name of your new environment:

```julia-repl
(@v1.8) pkg> activate MyTest # create new environment called "MyTest"
Activating new project at `~/.julia/environments/v1.8/MyTest`
(@v1.10) pkg> activate MyTest # create new environment called "MyTest"
Activating new project at `~/.julia/environments/v1.10/MyTest`
(@MyTest) pkg> # environment is active
```

This creates a new folder at `~/.julia/environments/v1.8/MyTest`
This creates a new folder at `~/.julia/environments/v1.10/MyTest`
containing a `Project.toml` and `Manifest.toml`.
Adding packages to this environment will update both of these files:

```julia-repl
(@MyTest) pkg> add LinearAlgebra
Resolving package versions...
Updating `~/.julia/environments/v1.8/MyTest/Project.toml`
Updating `~/.julia/environments/v1.10/MyTest/Project.toml`
[37e2e46d] + LinearAlgebra
Updating `~/.julia/environments/v1.8/MyTest/Manifest.toml`
Updating `~/.julia/environments/v1.10/MyTest/Manifest.toml`
[56f22d72] + Artifacts
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
Expand All @@ -176,7 +176,7 @@ In your Julia REPL, enter package mode and type `activate --temp`.
This will create an environment with a randomized name in a temporary folder.

```julia-repl
(@v1.8) pkg> activate --temp
(@v1.10) pkg> activate --temp
Activating new project at `/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_9AGcg1`
(jl_9AGcg1) pkg>
Expand Down Expand Up @@ -692,7 +692,7 @@ follow the [Registrator.jl instructions](https://github.com/JuliaRegistries/Regi
People will then be able to install your package by writing

```julia-repl
(@v1.8) pkg> add MyPackage
(@v1.10) pkg> add MyPackage
```

## Experiments with DrWatson.jl
Expand Down

0 comments on commit c41cd90

Please sign in to comment.