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.
- Host: GitHub
- URL: https://github.com/pabroux/conda-piptools
- Owner: pabroux
- License: mit
- Created: 2025-01-31T16:47:55.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-03-22T00:16:35.000Z (about 2 months ago)
- Last Synced: 2025-03-22T01:22:09.775Z (about 2 months ago)
- Topics: conda, pip-tools, python
- Language: Makefile
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
A mini tool to better handle your Conda environment and Python package
## 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.