Generate conda packages directly from python wheels
whl2conda is a command line utility to build and test conda packages generated directly from python wheels.
Background: See doc/about/motivation.md for the story behind this project.
-
Performance: because it does not need to create conda environments in order to build, this is much faster than solutions involving conda-build.
-
Dependency renaming: renames pypi package dependencies to their corresponding conda name. Automatically renames packages from known list collected from conda-forge and supports user-specified rename patterns as well.
-
Multiple package formats: can generate both V1 ('.tar.bz2') and V2 ('.conda') conda package formats. Can also generate an unpacked directory tree for debugging or additional user customization.
-
Project configuration: whl2conda project-specific options can be read from project's
pyproject.tomlfile. -
Test install support: supports installing conda package into a conda environment for testing prior to deployment.
-
Hides pypi dependencies: rewrites the original pip/pypi dependencies in the installed dist-info to avoid compatibility issues.
-
Binary wheel support: can convert non-pure Python wheels containing binary extensions (
.so,.pyd) into platform-specific conda packages using the--allow-impureflag. Automatically generates tight Python version pins and OS constraints from wheel platform tags, with special support for stable ABI (abi3) and multi-platform (fat) wheels. Conversions of representative C, C++, Cython, rust, and abi3 extension packages are regularly verified to be equivalent to the corresponding conda-forge packages on linux, macOS, and windows.Limitations: Binary conversion is designed for self-contained extension packages (e.g., markupsafe, cryptography, orjson). Wheels that bundle vendored shared libraries (e.g., lxml, pillow) convert with a warning but bypass conda's dependency management for those libraries, and wheels with local version suffixes (e.g.,
+cu121variant builds) are refused. For complex GPU/CUDA packages, use conda-forge packages instead.
Installation
With pip:
pip install whl2conda
With conda (upcoming):
conda install -c conda-forge whl2conda
Quick usage
Generate a conda package in same directory as wheel file:
whl2conda convert dist/mypackage-1.2.3-py3-none-any.whl
Add default tool options to pyproject.toml
whl2conda config --generate-pyproject pyproject.toml
Build both wheel and conda package for project:
whl2conda convert --build-wheel my-project-root
Create python 3.10 test environment for generated conda package:
whl2conda install dist/mypackage-1.2.3.-py_0.conda --create -n testenv \
--extra pytest python=3.10
Metadata
Release files for whl2conda 26.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| whl2conda-26.7.2.tar.gz | 96.3 kB | With provenance | Details for whl2conda-26.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whl2conda-26.7.2-py3-none-any.whl | Python 3 | none | any | Details for whl2conda-26.7.2-py3-none-any.whl |
Total release size: 212.4 kB
Release files / whl2conda-26.7.2.tar.gz
| Download URL | whl2conda-26.7.2.tar.gz |
|---|---|
| Size | 96.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d12f53a80d8626bf57e1159b1e8746401f4999ac46cfedcfec74091ab2268b0
|
|
BLAKE2b-256 checksum How to use checksums |
f0fd4e28a81ff4c13fabdd3d1a95507582b8fcb2ac5877aafb215ceeb08e47b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / whl2conda-26.7.2-py3-none-any.whl
| Download URL | whl2conda-26.7.2-py3-none-any.whl |
|---|---|
| Size | 116.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa3bbf1f37c907c3428ec445a64f98876b653e8e42dda5cb7db4401245cc7061
|
|
BLAKE2b-256 checksum How to use checksums |
ab30941f0fe25daf29c9d8f92e03b7532417284da705fbc281abad30535034a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logSecurity for whl2conda 26.7.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for whl2conda-26.7.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.