# Skip the README, let us install for you

If you’ve ever tried to install a complex Python package, you know the pain of scouring the package’s README for the apt install or brew install commands necessary to bring in the system-level dependencies the package needs. This approach can be time-consuming and frustrating, especially when a cascade of errors indicates a missing system dependency — a pain point that isn't always immediately obvious.

**Featured image unavailable: Cover artwork for the article “Skip the README, let us install for you”.**

[Open original](https://replit.com/api/storage/public-objects/article-media/system-dependencies-python/sanity-70bad805a7ce429189764bb14a236f986c456e7f.d90d831240970165.webp)

- Published: 2023-12-15T17:00:00.000Z
- Authors: Ryan Mulligan
- Canonical: https://replit-engineering-blog.pages.dev/system-dependencies-python/

---

If you’ve ever tried to install a complex Python package, you know the pain of scouring the package’s README for the `apt install` or `brew install` commands necessary to bring in the system-level dependencies the package needs. This approach can be time-consuming and frustrating, especially when a cascade of errors indicates a missing system dependency — a pain point that isn't always immediately obvious.

You can now skip the README and let us install everything for you. Replit will automatically install the system dependencies needed for hundreds of Python packages. When you add a package via the Packages tool or automatically install a package via package guessing, Replit’s [Universal Package Manager](https://github.com/replit/upm) detects system dependencies needed for these packages. This also extends to packages already in your `pyproject.toml` file, and adds the relevant system dependencies to your Repl’s `replit.nix` file.

To illustrate the efficiency of this tool, let’s ask Replit AI to help us make a snowman. We’ll try to create a vector graphics image using Python’s [pycairo library](https://pycairo.readthedocs.io/en/latest/). To start, create a new Python Repl and select **Generate Code with AI**. Enter the prompt: “Using Python's pycairo, draw an SVG snowman. The snowman should have three balls of snow, a carrot nose, and two black eyes. Import math if you need it.”

**Image unavailable: Prompting Replit AI**

[Open original](https://replit.com/api/storage/public-objects/article-media/system-dependencies-python/sanity-cbeb402b897a215e41792c60390864af0a45e211.c74cb47a6ae477b1.webp)

_Prompting Replit AI_

The full code is available in [this Repl](https://replit.com/@ryantmreplit/Pycairo-Snowman#main.py).

Before automatic system dependency installation, you would have been greeted with an arcane error message like this, buried among hundreds of lines of output:

`'pkg-config' not found. Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10'] ---------------------------------------- ERROR: Failed building wheel for pycairo Failed to build pycairo ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly`

Even if you knew to install the `pkg-config` program, you’d see another error message because `pycairo` depends on the `cairo` system package:

``running build_ext Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containing `cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.``

Replit's new approach eliminates these obstacles. When you Run the Repl, the necessary packages will automatically be added to your `replit.nix` file:

```python
{pkgs}: {

  deps = [

    pkgs.pkg-config

    pkgs.libxcrypt

    pkgs.cairo

  ];
}
```

This installs the system dependencies, and the code generates a simple SVG snowman:

**Image unavailable: Snowman**

[Open original](https://replit.com/api/storage/public-objects/article-media/system-dependencies-python/sanity-66f53160defff9295396c97ccc3b9cf2865b544d.7ad46f6bb3bf714f.webp)

_Snowman_

Using information from the [Nixpkgs package repository](https://github.com/nixos/nixpkgs), we’ve pre-populated system dependencies for [over 700 Python libraries](https://github.com/replit/upm/blob/main/internal/nix/python_map.json). This automation streamlines the process and significantly enhances productivity, allowing you to focus more on development and less on configuration.

We are committed to continually expanding this list, covering more packages and supporting additional programming languages. If you encounter a package that is not yet supported or have suggestions for improvement, please send us a [Pull Request](https://github.com/replit/upm/edit/main/internal/nix/python_map.json) or let us know on the [Ask Forum](https://ask.replit.com/t/automatically-installing-python-system-dependencies/74996).

Interested in solving complex problems around developer tooling to empower the next billion software creators? [Join our team\!](https://replit.com/site/careers)
