DEV Community

Cover image for Setting Up A Julia Development Environment
John ✨️
John ✨️

Posted on • Originally published at johna.hashnode.dev

Setting Up A Julia Development Environment

Introduction

This guide provides a simple walkthrough on how to get Julia running in VS Code. So it is assummed that you have the IDE (Integrated Development Environment) installed. If not you can download VS Code here.

Installation Steps

  1. Download and Install Julia: As recommended on the official Julia website you should be downloading and using the latest stable release of Julia for you machine. After downloading, run the installer and follow the instructions.

  2. Install the Julia Extension: you can find the extension here or you could directly search the term julia in the extension marketplace. It should be the first popping up with "Julia Language Support" as the description. The extension provides language support and other features like syntax highlighting, code completion, and debugging.

Julia Extension Screenshot

  1. Test Your Setup: To make sure your setup is working correctly, open VS Code and create a new file with a .jl extension, main.jl for example. Then write your first line of Julia, such as println("Hello, world!"). Save the file and run it by clicking the "play" button at the top right corner in VS Code.

If you're getting an error message that reads like this:



Cannot read properties of undefined.


Enter fullscreen mode Exit fullscreen mode

It might be that the extension does not find the julia executable. You can fix this by setting the julia.executablePath to point to julia.exe on your machine. You can set the path via the menu File->Preferences->Settings->Extensions and the select julia. Under julia go to Julia: Executable Path and enter the path.

You can find the right path by searching julia.exe, open the file location and copy the path, which should look something like this:



C:\Users\moyoj\AppData\Local\Programs\Julia-1.8.5\bin\julia.exe


Enter fullscreen mode Exit fullscreen mode

And your Julia program should run successfully.


I hope that this article is helpful and you learned something from it. Being a technical writer and content creator I am passionate about sharing my knowledge (including tips and advice) and helping other people achieve their goals, especially those just starting out in tech. You can connect with me on my social media profiles and blogs here.

Top comments (0)