summerschool_simtech_2023/installation/julia.qmd

44 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-09-13 16:57:26 +02:00
# Installing Julia
2023-09-19 12:14:48 +02:00
The recommended way to install julia is [juliaup](https://github.com/JuliaLang/juliaup).
It allows you to, e.g., easily update Julia at a later point, but also test out alpha/beta versions etc.
2023-09-13 16:57:26 +02:00
TLDR; If you dont want to read the explicit instructions, just copy the following command
### Windows
AppStore -> JuliaUp, or `winget install julia -s msstore` in CMD
### Mac & Linux
`curl -fsSL https://install.julialang.org | sh` in any shell
# VSCode
To install VSCode (the recommended IDE), go to [this link](https://code.visualstudio.com/download) and download + install the correct package.
Next, install the Julia extension
![](https://juliateachingctu.github.io/Julia-for-Optimization-and-Learning/stable/installation/vscodeext_1.png) (thanks to https://juliateachingctu.github.io for providing us with the nice graphics)
Finally press `Ctrl + Shift + P` to get VSCodes command palette, and type in `Julia: Start REPL`
2023-09-19 12:14:48 +02:00
![](https://juliateachingctu.github.io/Julia-for-Optimization-and-Learning/stable/installation/vscodeext_2.png)
# Optional: OhMyREPL
Optionally you cann install a package to give you nicer syntax highlighting in the REPL.
1. Install the package:
`]activate` (without a path after activate, you activate the "global" environment)
`]add OhMyREPL`
2. Add it to your `startup.jl`
Open `.julia/config/startup.jl` or `c:/users/USERNAME/.julia/config/startup.jl` on windows and add
```julia
atreplinit() do repl
try
@eval using OhMyREPL
catch e
@warn "error while importing OhMyREPL" e
end
end
```
:tada: ![](https://kristofferc.github.io/OhMyREPL.jl/latest/features/rainbow_brackets.png)