Skip to content

oschulz/julia-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Julia installation and initial setup

Disclaimer: The following instructions contain personal recommendations by the author and are neither "official" nor the only way of installing and setting up Julia. The instructions and included software/scripts are licensed under the MIT license, without warranty, use at your own risk.

This is a short tutorial on how to install the Julia programming language and set things up so you can use Julia Jupyter notebooks (via the IJulia Jupyter kernel) and automatic code reloading (via Revise).

First, download and install Julia v1.10:

  • On Linux, simply download and extract the binary tarball and add the "bin" subdirectory to your $PATH.

  • On OS-X, download the disk image, open it, and drop "Julia" into your "Applicaitons" folder.

  • On Windows, downdload and run the Julia installer.

Alternatively, you can use Juliaup to install Julia and manage Julia versions.

On Windows (only!), you may also need to install the Visual C++ redistributable, e.g. if you want to use CUDA from Julia.

You should also install Visual Studio Code and the excellent VS-Code Julia extension.

If you want to run Jupyter notebooks outside of Visual Studio Code, you will also need a working Jupyter installation. JupyterLab Desktop is easy to install, but an Anaconda or custom Python installation with Jupyter will work too, of course.

Now open a Julia REPL. To open a REPL, you can

  • use Ctrl+Shift+P (Shift+Command+P on OS-X) and select "Julia: Start REPL" in Visual Studio Code, or

  • start the Julia application on OS-X or Windows, or

  • run julia in a shell/terminal if the Julia executable is on your $PATH.

Then run

julia> include(download("https://raw.githubusercontent.com/oschulz/julia-setup/main/julia_setup_ijulia_revise.jl"))

to install and configure IJulia and Revise.

Now press "]" to enter the Julia package management console and add some Julia packages you need, like

(@v1.10) pkg> add Plots

Note: Later on, you will probably want to use separate Julia project environments for different use cases, instead of adding all packages you may possibly need to your default environment. Julia project environments are lightweight (different from Python virtual environments) and easy to manage.

Press backspace or Ctrl+C to get back to the main Julia REPL. Test if you can make a plot:

using Plots
plot(rand(100))

You should be all set now, have fun with Julia!

About

Julia language installation and setup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages