# Best way to install and use julia on Nix/NixoS

**URL:** <https://discourse.julialang.org/t/best-way-to-install-and-use-julia-on-nix-nixos/109948>\
**Category:** General Usage\
**Tags:** installation, nixos\
**Created:** [February 8, 2024, 8:04pm UTC](https://discourse.julialang.org/t/best-way-to-install-and-use-julia-on-nix-nixos/109948 "2024-02-08T20:04:58Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [September 12, 2025, 6:15am UTC](https://discourse.julialang.org/t/best-way-to-install-and-use-julia-on-nix-nixos/109948/18 "2025-09-12T06:15:20Z")

</div>

Improvements to native Julia installation on Nix are merged: [Julia.withPackages improvements by thomasjm · Pull Request #433332 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/433332)

EDIT: If you also use Python or R the way packages are installed using a nix expression might be confusing so here a quick guide

# Julia

```julia-auto
# Nix compiled julia (possibly cached)
pkgs.julia.withPackages ["DataFrames" "StatsBase"]
# or Julia provided binary
pkgs.julia-bin.withPackages ["DataFrames" "StatsBase"]
# or LTS (binary?)
pkgs.julia-lts.withPackages ["DataFrames" "StatsBase"]

```

# R

```julia-auto
pkgs.rWrapper.override{ packages = with pkgs.rPackages; [ggplot2 dplyr xts]; }

```

# Python

```julia-auto
pkgs.python3.withPackages (python-pkgs: [
      python-pkgs.pandas
      python-pkgs.requests
    ])

```

---

_[View the full topic](https://discourse.julialang.org/t/best-way-to-install-and-use-julia-on-nix-nixos/109948)._
