> For the complete documentation index, see [llms.txt](https://docs.bcbi.brown.edu/codiac-for-health/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bcbi.brown.edu/codiac-for-health/codiac-for-health/computing/julia/packages.md).

# Packages

<mark style="color:$primary;">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.</mark>&#x20;

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

## Installing Packages <a href="#installing_packages" id="installing_packages"></a>

* 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 <a href="#using_packages" id="using_packages"></a>

```julia
julia> using CSV
julia> using DataFrames

julia> exit()
```

## Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* 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 <a href="#documentation" id="documentation"></a>

* [Julia Pkg](https://docs.julialang.org/en/v1/stdlib/Pkg/index.html)
* [Julia Package Registries](https://julialang.org/packages/)
* [JuliaHealth](https://juliahealth.org/) and [BioJulia](https://github.com/BioJulia) organizations (focused on Julia packages for health and life sciences)
* Julia Package: [CSV.jl](https://juliadata.github.io/CSV.jl/stable/)
* Julia Package: [DataFrames.jl](https://juliadata.github.io/DataFrames.jl/stable/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bcbi.brown.edu/codiac-for-health/codiac-for-health/computing/julia/packages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
