Skip to content

About

Better PyPI interoperability for the conda ecosystem

Resources

Code of conduct

Contributing

Stars

45 stars

Watchers

4 watching

Forks

Repository files navigation

conda-pypi

conda-pypi logo

Better PyPI interoperability for the conda ecosystem.

Project Status

This is a community-maintained project under the conda organization.

Getting Help

What is this?

The conda-pypi plugin improves conda's integration with Python packaging tools. The most important feature is the conda-pypi channel, hosted by Anaconda, which makes pure Python wheels from PyPI available to users natively through conda install.

Using conda-pypi

For the best experience with conda-pypi, update to conda 26.9 or later. To update:

conda self update

or if updating from older versions of conda without conda-self you can also run:

conda install --name base "conda>=26.9"

To opt in, enable the Rattler solver and add the conda-pypi channel:

conda config --set solver rattler
conda config --append channels conda-pypi

After configuring, you can use packages from PyPI alongside conda packages in your normal conda workflows, without needing to convert the wheel files to conda files.

conda install uses conda package names, which sometimes differ from the PyPI project name. For example, conda-forge publishes the PyPI project jupyterlab-code-formatter as jupyterlab_code_formatter, so run conda install jupyterlab_code_formatter. The conda pypi subcommands accept PyPI names and translate them.

Advanced options

conda-pypi includes more advanced subcommand controls for working with Python packages. These options are recommended for users who want to experiment with conda and wheels and work with cutting-edge plugin features.

You can use the following commands with the conda pypi subcommand to do more with the conda-pypi plugin:

  • conda pypi convert: Convert Python projects to .conda format without installing them.
  • conda pypi index: Index a local directory of .whl files to create a local conda channel.
  • conda install from wheel channels (experimental): channels can serve pure Python wheels directly in repodata.json.
  • A warning when running conda create or conda install with pip in the environment.

conda pypi install is pending deprecation. See the features documentation for its remaining use cases, such as editable installs.

Why?

Mixing conda packages and packages installed with pip is often discouraged in the conda ecosystem. There are only a handful patterns that are safe to run. This tool aims to provide a safer way of keeping your conda environments functional while adding Python distribution packages. Refer to the documentation for more details.

Attribution

  • This project incorporates conda-pupa by Daniel Holth, which provides the core wheel-to-conda conversion functionality.
  • The conda-pypi platypus logo is by James Turner.
  • Ideas for improved version specifier conversion comes from reroll by Anil Kulkarni.

Contributing

Please refer to CONTRIBUTING.md.

About

Better PyPI interoperability for the conda ecosystem

Resources

Code of conduct

Contributing

Stars

45 stars

Watchers

4 watching

Forks

Releases

Used by

Contributors

Languages