LogoLogo
Computing Skills
Computing Skills
  • Introduction
  • File Directory Structures
  • Text Editors
  • GitHub
  • Unix
  • Julia
    • Installation
    • REPL
    • Basic Syntax
    • Numbers and Math
    • Strings and Characters
    • Regular Expressions
    • Control Flow
    • Collections and Data Structures
    • File Input/Output
    • Packages
    • DataFrames
    • JuliaPlots
    • ScikitLearn.jl
    • JuliaStats
    • Exercises
  • Python
    • Installation
    • REPL
    • Basic Syntax
    • Numbers and Math
    • Strings and Characters
    • Regular Expressions
    • Control Flow
    • Collections and Data Structures
    • File Input/Output
    • Packages
    • Data Frames and Data Manipulation
  • R
    • Installation
    • REPL
    • Basic Syntax
    • Numbers and Math
    • Strings and Characters
    • Regular Expression
    • Control Flow
    • Collections and Data Structures
    • File Input/Output
    • Packages
    • DataFrames
    • Data Analysis and Manipulation
Powered by GitBook
On this page
  • Installing Packages
  • Using Packages
  • Troubleshooting
  • Resources
Export as PDF
  1. Julia

Packages

In computer programming, a package is a collection of modules or programs that are often published as tools for a range of common use cases, such as text processing and doing math. Programmers can install these packages and take advantage of their functionality within their own code.

This page provides instructions for installing, using, and troubleshooting packages in Julia.

Installing Packages

  • Start Julia REPL by typing the following in Terminal or PowerShell (Note: do not need to type $ - this is to indicate the shell prompt)

$ julia
  • Go into REPL mode for Pkg, Julia’s built in package manager, by pressing ]

$ julia ]
$ (@v1.4) pkg>
  • Update package repository in Pkg REPL

$ (@v1.4) pkg> update
  • Add packages in Pkg REPL

$ (@v1.4) pkg> add CSV
$ (@v1.4) pkg> add DataFrames
  • Check installation

(@v1.4) pkg> status
            Status `~/.julia/environments/v1.0/Project.toml`
                [336ed68f] CSV v0.4.3
                [a93c6f00] DataFrames v0.17.1
                ...
  • Get back to the Julia REPL and exit by pressing backspace or ^C.

(@v1.4) pkg>

julia>
  • To see REPL history

$ more ~/.julia/logs/repl_history.jl

Using Packages

julia> using CSV
julia> using DataFrames

julia> exit()

Troubleshooting

  • If you get an error like: ERROR: SystemError: opening file "C:\\Users\\User\\.julia\\registries\\General\\Registry.toml": No such file or directory

    • Delete C:\\Users\\User\\.julia\\registries where User is your computer’s username and try again

    • https://discourse.julialang.org/t/registry-toml-missing/24152

Resources

PreviousFile Input/OutputNextDataFrames

Last updated 6 months ago

and organizations (focused on Julia packages for health and life sciences)

Julia Package:

Julia Package:

Julia Pkg
Julia Package Registries
JuliaHealth
BioJulia
CSV.jl
DataFrames.jl