Shared global environment package installer using symlinks โ like pnpm for Python
Project description
๐ pepip
uv and pip, but shared. Install packages once. Use them everywhere.
pepip is the pnpm of Python โ a drop-in alternative to pip / uv that stores each resolved package version once in a shared store and wires your project .venv to it via symlinks. No more downloading torch and transformers five times across experiments. It internatly uses uv for package resolution and venv management, so you get all the same features and compatibility, but with a fraction of the disk usage and faster installs for subsequent projects.
Built for package-heavy Python workflows, pepip is especially useful for AI/ML projects that repeatedly create envs for model prototyping, training, and inference.
๐ค The Problem
Every Python project gets its own virtual environment. That means every project downloads and stores its own copy of every dependency โ including the big ones.
project-a/.venv/ โ numpy 1.0 (34 MB) torch 2.4 (2.2 GB)
project-b/.venv/ โ numpy 2.0 (35 MB) torch 2.4 (2.2 GB)
project-c/.venv/ โ numpy 2.0 (35 MB) torch 2.5 (2.3 GB)
โ stored 3ร for no reason
โ The Solution
pepip keeps an immutable shared package-version store and symlinks each project's .venv back to the exact versions it resolved. Same Python import behaviour. A fraction of the disk usage.
~/.pepip/packages/ โ numpy 1.9 (34 MB) numpy 2.0 (35 MB) torch 2.4 (2.2 GB)
torch 2.5 (2.3 GB) โ stored once per version
project-a/.venv/ โ numpy 1.0 (symlink) torch 2.4 (symlink) โ ~bytes
project-b/.venv/ โ numpy 2.0 (symlink) torch 2.4 (symlink) โ ~bytes
project-c/.venv/ โ numpy 2.0 (symlink) torch 2.5 (symlink) โ ~bytes
๐ Comparison
| Feature | uv / pip | conda | pepip |
|---|---|---|---|
| Shared package store | โ | โ | โ |
| Disk usage (multi-project) | ๐ด | ๐ข | ๐ข |
| Install speed (repeat packages) | ๐ก | ๐ก | ๐ข |
| Virtual env compatibility | โ | โ | โ |
| Multiple versions for each env | โ | โ | โ |
| Tool installation size | ๐ข | ๐ด | ๐ข |
Key differences:
- Speed and download size: While uv and conda cache helps, they still copy packages. If cache is cleared, they redownload. pepip only downloads once per version, then symlinks for every project, allowing instant installs for subsequent projects.
As pepip is based on uv, it has same advantages as uv, without the repeated download and storage cost.
๐ Installation
pip install pepip
Requirements: Python 3.8+ ยท uv (auto-installed)
๐ฆ Usage
Install packages using pepip
# Install one or more packages
pepip install numpy pandas
# AI/ML stack example
pepip install torch transformers accelerate datasets
# Install from a requirements file
pepip install -r requirements.txt
# Use a custom local venv path (default: .venv)
pepip install numpy --venv /path/to/my-env
Then activate and use your .venv exactly as you normally would:
source .venv/bin/activate
python -c "import numpy; print(numpy.__version__)"
Usage using "uv"
uvx pepip install numpy pandas
This can be executed without installing pepip or creating a virtual environment, as long as uv is installed.
Override the global store location
PEPIP_HOME=/shared/team-env pepip install torch
This is handy for sharing a global store across a whole team on a shared machine.
๐ How it works
~/.pepip/
โโโ global-venv/ โ build interpreter for uv installs
โโโ packages/
โโโ cpython-312-linux-x86_64/
โโโ numpy-1.0/
โ โโโ numpy/ โ real files, stored once
โ โโโ numpy-1.0.dist-info/
โโโ numpy-2.0/
โ โโโ numpy/ โ real files, stored once
โ โโโ numpy-2.0.dist-info/
โโโ torch-2.4/
โ โโโ torch/ โ real files, stored once
โ โโโ torch-2.4.dist-info/
โโโ torch-2.5/
โโโ torch/ โ real files, stored once
โโโ torch-2.5.dist-info/
my-project-1/
โโ .venv/
โโ lib/
โโ python3.12/
โโ site-packages/
โโ numpy โโโโ ~/.pepip/packages/.../numpy-2.0/numpy (symlink, ~bytes)
โโ pandas โโโโ ~/.pepip/packages/.../pandas-2.2/pandas (symlink, ~bytes)
my-project-2/
โโ .venv/
โโ lib/
โโ python3.12/
โโ site-packages/
โโ torch โโโโ ~/.pepip/packages/.../torch-2.4/torch (symlink, ~bytes)
โโ numpy โโโโ ~/.pepip/packages/.../numpy-1.0/numpy (symlink, ~bytes)
- First install of a package version โ downloads once into the shared store, then symlinks.
- Every subsequent project using the same package version โ symlinks only. Near-instant, zero extra disk.
- Different projects can use different versions โ for example, one project can link to
numpy==1.0while another links tonumpy==2.0. Each version is stored once, and projects link to the version they resolved.
๐ Benchmarks
The eval/benchmark.py script measures installation latency and disk usage across N projects compared to a plain uv workflow.
# 5 projects, mixed real-world packages
python eval/benchmark.py --projects 5 --packages tomli packaging requests numpy pandas
# Keep temp directories for manual inspection
python eval/benchmark.py --no-cleanup
Latest results โ 5 projects ยท tomli packaging requests numpy pandas
| Metric | uv (baseline) | pepip | Improvement |
|---|---|---|---|
| โฑ Latency | 0.56 s | 0.33 s โ | โ41.3 % |
| ๐พ Disk usage | 475.19 MB | 95.22 MB โ | โ80.0 % |
โฑ pepip saved 0.23 s of install time across 5 projects. ๐พ pepip saved 379.97 MB of disk space across 5 projects.
Why the savings get better over time
- Storage savings are consistent from project one: each package version lives exactly once in the global store, so local
.venvdirectories contain only tiny symlinks (dozens of bytes each) instead of full copies. - Latency savings grow with project count: the first project pays the same download cost as plain
uv. Every additional project only needs venv creation + symlink creation, which is nearly instant. For large packages liketorchortransformers(GBs in size), these savings per extra project are proportionally enormous. - Best fit for AI iteration loops: if you spin up multiple repos for finetuning runs, eval pipelines, or inference services,
pepipavoids repeatedly materializing the same heavy dependencies.
๐ Development
# Clone and install in editable mode
git clone https://github.com/perf-pip/pepip
cd pepip
pip install -e .
# Run tests
pip install pytest
pytest
๐ข Docker usage
pepip is primarily designed for local machine workflows where multiple projects can reuse one shared store over time. In Docker, images are usually ephemeral and already layer-cached, so the benefit is smaller.
That said, pepip can still be useful in Docker when you want to share one package store across repeated container runs (for example during local development).
1) Simple container install
FROM python:3.12-slim
# uv is required by pepip
RUN pip install --no-cache-dir uv pepip
WORKDIR /app
COPY requirements.txt .
# Creates /app/.venv and links packages from /root/.pepip
RUN pepip install -r requirements.txt
2) Attach system-level PEPIP_HOME from host
Bind your host's ~/.pepip into the container's default pepip path (/root/.pepip):
docker run --rm \
-v "$PWD":/app \
-v "$HOME/.pepip":/root/.pepip \
-e PEPIP_HOME=/root/.pepip \
-w /app \
python:3.12-slim \
sh -lc "pip install -q uv pepip && pepip install -r requirements.txt"
This attaches the host-level pepip store directly, so both local and container workflows reuse the same resolved package versions.
๐ก Inspired by
pnpm โ the Node.js package manager that pioneered content-addressable, symlink-based shared stores. pepip brings the same idea to the Python ecosystem.
Acknowledgements
- uv โ used for venv management, package resolution, and shared download caching.
Made with โค๏ธ for developers tired of downloading torch over and over again.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pepip-0.0.3.tar.gz.
File metadata
- Download URL: pepip-0.0.3.tar.gz
- Upload date:
- Size: 191.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0881b819ae8c6b3be9cf0db547c7f832259a6a08eb5447d3eea5cd6dcec8d038
|
|
| MD5 |
742fab812046bbcb1ef4db9ceff9ec01
|
|
| BLAKE2b-256 |
b55597e3379e0c2bf31e76c6b1f352e493be3781831aac3be9eafe0e15e196d2
|
Provenance
The following attestation bundles were made for pepip-0.0.3.tar.gz:
Publisher:
publish-pypi.yml on perf-pip/pepip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pepip-0.0.3.tar.gz -
Subject digest:
0881b819ae8c6b3be9cf0db547c7f832259a6a08eb5447d3eea5cd6dcec8d038 - Sigstore transparency entry: 1301417371
- Sigstore integration time:
-
Permalink:
perf-pip/pepip@f60640d9bbdb9ece34f5602df51d1e5a049594ec -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/perf-pip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f60640d9bbdb9ece34f5602df51d1e5a049594ec -
Trigger Event:
release
-
Statement type:
File details
Details for the file pepip-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pepip-0.0.3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48f978c82e35e8891d75c6ccc5e4dc7b63327fcfdd7c108ff1896950f6f190a9
|
|
| MD5 |
921599db50e036ff5eaf90b30868c5c4
|
|
| BLAKE2b-256 |
0a2c5ad5a388521689edb35cabedb6698f382e181d1dea09824e82565140ed0f
|
Provenance
The following attestation bundles were made for pepip-0.0.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on perf-pip/pepip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pepip-0.0.3-py3-none-any.whl -
Subject digest:
48f978c82e35e8891d75c6ccc5e4dc7b63327fcfdd7c108ff1896950f6f190a9 - Sigstore transparency entry: 1301417437
- Sigstore integration time:
-
Permalink:
perf-pip/pepip@f60640d9bbdb9ece34f5602df51d1e5a049594ec -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/perf-pip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f60640d9bbdb9ece34f5602df51d1e5a049594ec -
Trigger Event:
release
-
Statement type: