Skip to content

Install and configure system-wide software

At work, you will likely need access to a development machine, one that is powerful enough for you to do your data science work. It may be a workstation, or it may be an instance in the cloud. Regardless, you'll want to configure it and take full control over how it works.

Step one starts with installing software that is available system-wide1. Doing so ensures that you have a machine that is geared towards data science work. It will give yourself a rich set of commonly necessary tooling right from the beginning, but without the bloat that might be unnecessary. With investments in automation, you'll be able to standardize your compute environment for maximal portability from computer to computer, and you will be able to get up and running as fast as possible with minimal downtime.

Install package managers

Your initial setup should include software that lets you install packages in isolated environments without the need to ask for administrative privileges. This is important because the data science software stack is evolving rapidly. Unless there are special circumstances, you will need to have the freedom to operate without restrictions placed on your machine.

pixi

To this end, I recommend bootstrapping your system with pixi, a modern package manager for Python and other languages. I have written about the advantages of pixi before and why I recommend using it in 2024, and you can read about it here, but to summarize the content here, pixi brings massive simplification to a data scientist's workflow in exchange for a slightly more elaborate configuration file.

As of the time of writing, pixi installation is a one-line command depending on your platform:

curl -fsSL https://pixi.sh/install.sh | bash
iwr -useb https://pixi.sh/install.ps1 | iex

uv

In addition to pixi, I also recommend installing uv as a package manager for Python. uv is going to be incredibly useful for you when you want to do things like run ad-hoc scripts reproducibly or install Python-based command line tools. I have found it to be a great complement to pixi and I use it in both my personal and work machines.

As of the time of writing, uv installation is a one-line command depending on your platform:

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

I don't recommend using pip to install uv because there is a risk that you might install it into a project-specific environment if you have legacy projects on your machine.

Homebrew (macOS) / apt (Linux)

System Package Managers

These are fallback options! Use uv tool install for Python CLI tools and pixi global install for other binaries first.

System package managers like Homebrew (macOS) and apt (Linux) should be used as a last resort when the tools you need aren't available through uv or pixi. This approach gives you better isolation and version control while avoiding potential conflicts with system packages.

To install Homebrew on macOS, follow the instructions on the homebrew website:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install software

Once you have your package managers installed, I have the following recommended list of software that, if installed, could provide a productivity boost to you.

Install with pixi global install

Tool Description Homepage Installation Command
ripgrep Fast recursive text search tool github.com/BurntSushi/ripgrep pixi global install ripgrep
bat Enhanced file viewer (replacement for cat) github.com/sharkdp/bat pixi global install bat
fd Fast alternative to find command github.com/sharkdp/fd pixi global install fd-find
fzf Fast fuzzy file finder github.com/junegunn/fzf pixi global install fzf
croc Secure file transfer tool github.com/schollz/croc pixi global install croc
eza Modern replacement for ls command github.com/eza-community/eza pixi global install eza
mosh (mobile-shell) Maintains SSH connections over flaky internet mosh.org pixi global install mosh
tmux Terminal multiplexer for persistent shell sessions github.com/tmux/tmux pixi global install tmux
direnv Load environment variables per directory direnv.net pixi global install direnv
atuin Enhanced shell history search and sync atuin.sh pixi global install atuin

Install with Homebrew (macOS) / apt (Linux)

Tool Description Homepage Installation Command
tree View file tree structure in terminal mama.indstate.edu/users/ice/tree/ brew install tree
diff-so-fancy Enhanced diff viewing tool github.com/so-fancy/diff-so-fancy brew install diff-so-fancy
gcc GNU C compiler for numerical computing packages gcc.gnu.org brew install gcc (macOS) / sudo apt install gcc (Linux)

Manual downloads

Tool Description Homepage Installation
Ollama Run LLMs locally ollama.ai Download from ollama.ai
Docker Container platform for app deployment docker.com Download Docker Desktop

Configure your PATH

After installing these tools, you'll need to configure your PATH environment variable to include the directories where these tools are installed. See Take full control of your shell environment variables for detailed instructions.

The key directories to add to your PATH are: - $HOME/.pixi/bin (for pixi global install packages)

Over the next few chapters, we will go through a small selection of tools mentioned above, why they are important/useful, and how to configure them.

TL;DR: Quick installation commands

If you want to install everything at once, here's a quick command block:

# Install package managers
curl -fsSL https://pixi.sh/install.sh | bash
curl -LsSf https://astral.sh/uv/install.sh | sh

# Configure shell
source ~/.zshrc

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install tools with pixi
pixi global install ripgrep bat fd-find fzf croc eza mosh tmux direnv atuin

# Install tools with Homebrew
brew install tree diff-so-fancy gcc

# Manual downloads needed:
# - Ollama: https://ollama.ai/download
# - Docker: https://www.docker.com/products/docker-desktop/
# Install package managers
curl -fsSL https://pixi.sh/install.sh | bash
curl -LsSf https://astral.sh/uv/install.sh | sh

# Configure shell
source ~/.bashrc

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install tools with pixi
pixi global install ripgrep bat fd-find fzf croc eza mosh tmux direnv atuin

# Install tools with Homebrew
brew install tree diff-so-fancy gcc

# Manual downloads needed:
# - Ollama: https://ollama.ai/download
# - Docker: https://www.docker.com/products/docker-desktop/
# Install package managers
curl -fsSL https://pixi.sh/install.sh | bash
curl -LsSf https://astral.sh/uv/install.sh | sh

# Configure shell
source ~/.zshrc

# Install tools with pixi
pixi global install ripgrep bat fd-find fzf croc eza mosh tmux direnv atuin

# Install tools with apt
sudo apt install tree diff-so-fancy gcc

# Manual downloads needed:
# - Ollama: https://ollama.ai/download
# - Docker: https://www.docker.com/products/docker-desktop/
# Install package managers
curl -fsSL https://pixi.sh/install.sh | bash
curl -LsSf https://astral.sh/uv/install.sh | sh

# Configure shell
source ~/.bashrc

# Install tools with pixi
pixi global install ripgrep bat fd-find fzf croc eza mosh tmux direnv atuin

# Install tools with apt
sudo apt install tree diff-so-fancy gcc

# Manual downloads needed:
# - Ollama: https://ollama.ai/download
# - Docker: https://www.docker.com/products/docker-desktop/

Troubleshooting

Package manager installation issues

Pixi installation fails

If the pixi installation script fails:

  1. Check your system requirements:

    uname -a
    
    Ensure you're on a supported platform (Linux, macOS, Windows)

  2. Try manual installation:

    # Download and install manually
    curl -fsSL https://pixi.sh/install.sh -o install_pixi.sh
    bash install_pixi.sh
    

  3. Check PATH configuration:

    echo $PATH | grep pixi
    
    Should include $HOME/.pixi/bin

uv installation fails

If uv installation fails:

  1. Check Rust installation (uv requires Rust):

    rustc --version
    
    If not installed, install Rust first: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

  2. Try alternative installation:

    pip install uv
    

  3. Verify installation:

    which uv
    uv --version
    

Tools not found after installation

If you can't find tools after installation:

  1. Check if tools are installed:

    pixi global list
    

  2. Verify PATH includes pixi bin:

    echo $PATH | grep -o '[^:]*pixi[^:]*'
    

  3. Add pixi to PATH manually:

    export PATH="$HOME/.pixi/bin:$PATH"
    

  4. Check tool locations:

    ls -la $HOME/.pixi/bin/
    

Homebrew installation issues

Permission errors on macOS

If you get permission errors:

  1. Fix ownership:

    sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/sbin
    

  2. Create directories if they don't exist:

    sudo mkdir -p /usr/local/bin /usr/local/lib /usr/local/sbin
    

Homebrew not found

If brew command isn't found:

  1. Add Homebrew to PATH:

    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
    source ~/.zshrc
    

  2. Check Homebrew location:

    ls -la /opt/homebrew/bin/brew
    ls -la /usr/local/bin/brew
    

PATH configuration issues

If tools aren't available in new terminals:

  1. Check your shell configuration:

    echo $SHELL
    cat ~/.zshrc | grep -i path  # or ~/.bashrc
    

  2. Add pixi to your shell config:

    echo 'export PATH="$HOME/.pixi/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
    

  3. Verify PATH order:

    echo $PATH | tr ':' '\n' | grep -n pixi
    

Common error messages and solutions

"Command not found"

# Check if tool is installed
pixi global list | grep tool_name

# Check if it's in PATH
which tool_name

# Reinstall if needed
pixi global install tool_name

"Permission denied"

# Fix permissions
chmod +x $HOME/.pixi/bin/tool_name

# Or reinstall
pixi global install --force tool_name

"SSL certificate errors"

# Update certificates
pixi global install --force tool_name

# Or try with insecure flag (not recommended for production)
curl -k -fsSL https://pixi.sh/install.sh | bash

Quick Reference

Essential Commands

# Check package manager versions
pixi --version
uv --version
brew --version

# List installed tools
pixi global list
brew list

# Install a tool
pixi global install tool_name
uv tool install tool_name
brew install tool_name

# Remove a tool
pixi global remove tool_name
brew uninstall tool_name

PATH Configuration

# Add to shell config
echo 'export PATH="$HOME/.pixi/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc

# Reload shell config
source ~/.zshrc

# Check PATH
echo $PATH | tr ':' '\n' | grep -E "(pixi|cargo|homebrew)"

Verification Commands

# Test tool installations
ripgrep --version
bat --version
fd --version
fzf --version

# Check if tools are in PATH
which ripgrep bat fd fzf

  1. This is defined as tooling that is needed independent of any individual project.