Lesson1 - creating .jl file and running it from Julia

Your file seems to lie in /Users/kassen/Desktop/<somefolder>/Example.jl whereas Julia by default starts in your home directory, i.e. /Users/kassen. You have a few options to get things working:

  1. Use absolute path: include("/Users/kassen/Desktop/<somefolder>/Example.jl")
  2. cd into the directory of the file: cd("/Users/kassen/Desktop/<somefolder>") followed by include("Example1.jl").
  3. Start Julia in the directory /Users/kassen/Desktop/<somefolder>/ in the first place: use e.g. Terminal or iTerm2 to navigate to the folder and then start julia with the julia command.

Merry Christmas! :slight_smile:

3 Likes