How do I use packages from the web in my project?

Hi there,

I’m trying to make my first steps in Julia and as a simple project I want to create a plot from a pre existing CSV file. I saw that there is a CSV package, but how can I import it?

The documentation seems to mostly cover the REPL, which I’m not using. There also seems to be a Project.toml file, but how can I fetch the dependencies I put in there? Do I use Pkg.add in my code file? What do include and using do then?

Also there is a shell program called pkg mentioned, which I don’t seem to have (I got julia 1.3 via pacman on Manjaro).
I’m using VSCode with the extension as my IDE.

This is how my project looks:

You need to use the REPL to install packages. To enter package mode you type ]

]add CSV

Please check:

Did you mean to ask about the difference between import and using? In this case, you want to take a look at the relevant part of the Julia documentation.

include on the other hand does something else entirely.

Hope this helps, and welcome to Julia!

1 Like