This module provides functionality to pack conda environments and their dependencies into a specified directory.
Project description
PACKING-PACKAGES
Overview
Packing-Packages is a powerful tool for packaging conda environments and their dependencies into portable directories. Perfect for deploying Python environments to offline machines, air-gapped systems, or ensuring reproducible environments across different machines with the same operating system.
Key Features
- 🚀 Simple & Fast: Pack entire conda environments with a single command
- 📦 Complete Dependency Resolution: Automatically includes all conda and pip dependencies
- 🔄 Cross-Platform Support: Pack from YAML files even on different operating systems
- 🛠️ Flexible Installation: Install packages directly or generate standalone install scripts
- ⚡ Incremental Updates: Use
--diff-onlyto download only new packages - 🎯 Error Resilient: Installation continues even if some packages fail, with detailed error reporting
- 📋 YAML-Based Packing: Create packages directly from conda environment YAML files
Use Cases
- Deploy Python environments to offline or air-gapped systems
- Create reproducible environment snapshots for production deployments
- Migrate conda environments between machines without internet access
- Archive complete environment states for backup or compliance
- Prepare environment packages for different target platforms
Installation
pip install packing-packages
Requirements: Python, setuptools, and pip
Quick Start
1. Pack Your Environment
On your source machine (with internet access), pack the current conda environment:
conda activate myenv
packing-packages pack -d .
This creates a directory structure:
.
└── myenv/
├── conda/ # Conda packages
└── pypi/ # PyPI packages
2. Install on Target Machine
On your destination machine (offline), install the packed packages:
conda create -yn myenv --offline
conda activate myenv
packing-packages install ./myenv
Alternative: Generate Standalone Scripts
Generate install scripts that work independently without requiring packing-packages:
packing-packages install ./myenv --generate-scripts
This creates install_packages.bat (Windows) and install_packages.sh (Unix/Linux) that can be executed directly on the target machine.
Advanced Features
Pack from YAML Files
Pack environments directly from conda environment YAML files, even on a different operating system:
packing-packages pack yaml environment.yaml -p linux-64
Incremental Updates
Only download packages that don't already exist in the target directory:
packing-packages pack -d . --diff-only
Error-Resilient Installation
The packing-packages install command continues even if some packages fail, providing detailed error reports for manual handling.
Documentation
For detailed command-line options, advanced usage, and troubleshooting, see the full documentation or the command-line tutorial.
Important Notes
Installation Methods
You can install packages using either:
- Standard commands (
conda install/pip install): Faster, but stops on first error packing-packages install: Slower, but continues on errors and provides detailed reports
Special Cases
- Non-PyPI sources (e.g., PyTorch official index): May require manual handling
- Older packages: Some may need
--use-pep517flag for successful installation - Proxy environments: Set
HTTP_PROXYandHTTPS_PROXYenvironment variables
For detailed troubleshooting and edge cases, please refer to the command-line tutorial.
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 packing_packages-0.4.1.tar.gz.
File metadata
- Download URL: packing_packages-0.4.1.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6ae0c35432e901887f5c526a434c202baa78fe911f8084740850a3f191ae05a
|
|
| MD5 |
351b0f264e39ed3f7acac7c76c763a7e
|
|
| BLAKE2b-256 |
ff02e887a52b513eb2402fb6e4fdf8237f7a47f11bba41e7aee6f63266badea0
|
Provenance
The following attestation bundles were made for packing_packages-0.4.1.tar.gz:
Publisher:
release-pypi.yml on yu9824/packing-packages
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
packing_packages-0.4.1.tar.gz -
Subject digest:
b6ae0c35432e901887f5c526a434c202baa78fe911f8084740850a3f191ae05a - Sigstore transparency entry: 829027417
- Sigstore integration time:
-
Permalink:
yu9824/packing-packages@8ad134c41c5b451e0208f468c554a799c183a330 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/yu9824
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@8ad134c41c5b451e0208f468c554a799c183a330 -
Trigger Event:
push
-
Statement type:
File details
Details for the file packing_packages-0.4.1-py3-none-any.whl.
File metadata
- Download URL: packing_packages-0.4.1-py3-none-any.whl
- Upload date:
- Size: 30.0 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 |
760b4f1dc08caced18c7a4e0009c410f188e86941a01ea32f1ae89851efe297c
|
|
| MD5 |
9c8fbaee991fae199f215e2faea80726
|
|
| BLAKE2b-256 |
155c1f5a9f05227d1ca1e7c63ee2e61ddc3cf173c2122b4932b013282fd644bc
|
Provenance
The following attestation bundles were made for packing_packages-0.4.1-py3-none-any.whl:
Publisher:
release-pypi.yml on yu9824/packing-packages
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
packing_packages-0.4.1-py3-none-any.whl -
Subject digest:
760b4f1dc08caced18c7a4e0009c410f188e86941a01ea32f1ae89851efe297c - Sigstore transparency entry: 829027418
- Sigstore integration time:
-
Permalink:
yu9824/packing-packages@8ad134c41c5b451e0208f468c554a799c183a330 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/yu9824
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@8ad134c41c5b451e0208f468c554a799c183a330 -
Trigger Event:
push
-
Statement type: