Skip to main content

This module provides functionality to pack conda environments and their dependencies into a specified directory.

Project description

PACKING-PACKAGES

CI docs release-pypi

Ruff mypy

python_badge license_badge PyPI version Downloads

This module provides functionality to pack conda environments and their dependencies into a specified directory.

You can use this package to migrate a conda environment to another offline machine with the same operating system.

Install

# Need python, setuptools, pip package
pip install packing-packages

How to use

see --help.

Pack

packing-package pack -d .

Install

packing-package install .

Example

Source device

conda activate <envname>
python -m pip install packing-packages
python -m packing_packages pack -d .

Destination device (offline)

conda create -yn <envname> --offline
conda activate <envname>
conda install --use-local --offline ./conda/*
python -m pip install --no-deps --no-build-isolation ./pypi/*

Notes

If you want to use pip to download from a source other than pypi.org (e.g. pytorch), the above will not completely collect. You will see packages that failed to download, so you will have to download them manually. This is very complicated and we do not plan to support it.

# install command
pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu124

# download command
# --no-deps: only target package
# -d: destination directory to download
pip download torch==2.5.1 --index-url https://download.pytorch.org/whl/cu124 --no-deps -d .

Some older packages may not install with pip install. In this case, you may succeed by installing only the failed packages with the --use-pep517 option. Please perform this manually.

There are two methods of installation: one is to use the standard functions of conda and pip, and the second is to use the paciking-package install command, which wraps them. The advantages of each are summarized in the table below.

Commands Advantages Disadvantages
conda install or pip install Fast Stop immediately when cause error
packing-package install Skip when error occurs and tell you the package Slow

If you have an env file (.yaml), please create a virtual environment from it and then pack it.

# on online device with same OS
conda env create -f=env_name.yml
conda activate <env_name>
python3 -m pip install packing-packages
packing-packages pack -d .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

packing_packages-0.0.3rc0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

packing_packages-0.0.3rc0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file packing_packages-0.0.3rc0.tar.gz.

File metadata

  • Download URL: packing_packages-0.0.3rc0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for packing_packages-0.0.3rc0.tar.gz
Algorithm Hash digest
SHA256 c0dbb797103598720553c6df7a51a69c646d6b6fcc4ffb9d573fbf3ab94a5742
MD5 4f54f6d2ee0cdf8d907a39d051f5d027
BLAKE2b-256 4c012a70d778fc1a9bf1e31ec3e03171267d35bf8cf43e86b26d5f1991abbeb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for packing_packages-0.0.3rc0.tar.gz:

Publisher: release-pypi.yml on yu9824/packing-packages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file packing_packages-0.0.3rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for packing_packages-0.0.3rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5d3f5bd07954936f124194c5fc6da4b01dab683bae7ccd79baa0a849c3c2bfd
MD5 31251d6ef9264142c3210919e403270b
BLAKE2b-256 7ddffe2d0de04e91ab270b2430babcb0713a5cb9df5b9c394931d4d165d1a61c

See more details on using hashes here.

Provenance

The following attestation bundles were made for packing_packages-0.0.3rc0-py3-none-any.whl:

Publisher: release-pypi.yml on yu9824/packing-packages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page