An open API service indexing awesome lists of open source software.

https://github.com/pabroux/conda-piptools

Conda-piptools makes your Conda environment and Python package management easier.
https://github.com/pabroux/conda-piptools

conda pip-tools python

Last synced: about 1 month ago
JSON representation

Conda-piptools makes your Conda environment and Python package management easier.

Awesome Lists containing this project

README

        





A mini tool to better handle your Conda environment and Python package





License Badge






Code Quality Checker Badge




Code Security Checker Badge


## About

Conda-piptools makes your Conda environment and Python package management easier:
- It allows you to specify easily the exact Python version as well as other things you want (e.g. CUDA and CUDNN versions) for a Conda environment;
- It allows you to better handle the dependencies and the compatibilities of your Python packages. More precisely, it requires you to only specify minimal constraints (e.g. `torch >= 1.7` and `numpy`) and Conda-piptools will then figure out exact and mutually compatible versions (e.g. `torch==1.7.1` and `numpy==1.19.5`).
`

> [!NOTE]
> As its name implies, Conda-piptools uses [Conda](https://anaconda.org/anaconda/conda) and [pip-tools](https://github.com/jazzband/pip-tools) in the background.

## Requirements

You need to have [Conda](https://anaconda.org/anaconda/conda) and [pip-tools](https://pip-tools.readthedocs.io/) installed.

## Usage

Follow these steps:

1. Specify your Python version as well as the versions of other things (e.g. CUDA and CUDNN versions) you want for a conda environment in the `environment.yml` file;
2. Use the `set_env_name.sh` script to set the name of the new or existing conda environment:
```
./set-env-name.sh "your-environment-name"
```
3. Specify your Python package requirements for the development and the production respectively in `requirements/dev.in` and `requirements/prod.in`;
4. Use the `make` command to create and/or update all your Python packages (use `make force` if you want to force it):
```
make
```

## Multiple Conda installation

If you have multiple Conda installed, use Conda-piptools inside the _base_ Conda environment of the targeted Conda.