Skip to content

Latest commit

 

History

History

pipenv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Python

Python by default will attempt to install your packages globally, or in the Nix Store (which it does not have permissions to modify). To use Python with Devbox, we recommend setting up a Virtual Environment using pipenv or Poetry (see below).

Example Repo

Adding Python to your Project

devbox add python@3.13, or in your devbox.json add:

  "packages": [
    "python@3.13"
  ],

This will install Python 3.13 in your shell. You can find other versions of Python by running devbox search python. You can also view the available versions on Nixhub

Pipenv

Example Repo

pipenv is a tool that will automatically set up a virtual environment for installing your PyPi packages.

You can install pipenv by adding it to the packages in your devbox.json. You can then manage your packages and virtual environment via a Pipfile

{
    "packages": [
        "python313",
        "pipenv"
    ],
    "shell": {
        "init_hook": "pipenv shell"
    }
}

This init_hook will automatically start your virtualenv when you run devbox shell.