Python (PIP)

Package installer: Pip

Framework
Python (PIP)
Category
Languages
Publisher
Jetify
{
  "packages": [
    "python@latest",
  ],
  "shell": {
    "init_hook": [
      ". $VENV_DIR/bin/activate",
      "pip install -r requirements.txt"
    ],
    "scripts": {
      "run_test": "python main.py"
    }
  }
}

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.10, or in your devbox.json add:

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

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

Installing Packages with Pip

Example Repo

Open In Devspace

pip is the standard package manager for Python. Since it installs python packages globally, we strongly recommend using a virtual environment.

You can install pip by running devbox add python3xxPackages.pip, where 3xx is the version of Python you want to install. This will also install the pip plugin for Devbox, which automatically creates a virtual environment for installing your packages locally

Your virtual environment is created in the .devbox/virtenv/pip directory by default, and can be activated by running . $VENV_DIR/bin/activate in your devbox shell. You can activate the virtual environment automatically using the init_hook of your devbox.json:

{
    "packages": [
        "python310",
        "python310Packages.pip"
    ],
    "shell": {
        "init_hook": ". $VENV_DIR/bin/activate"
    }
}
README.md

Level up your dev environment

No need to switch your style. Devbox works with any coding language, so you can get results as you write.
PREPARE FOR LAUNCH

Plans for teams of any size

Jetify Cloud offers pricing plans for Solo Developers to Large Enterprises, and everything in between. All plans include free credits, and you are only billed for what you use. Need something custom? Contact our team and we can help.
YOUR INPUT COUNTS

Join the community

Discuss ideas, uses and builds with the Jetify team and others.