A mini tool to better handle your Conda environment and Python package
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
andnumpy
) and Conda-piptools will then figure out exact and mutually compatible versions (e.g.torch==1.7.1
andnumpy==1.19.5
). `
You need to have Conda installed.
Follow these steps:
- 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; - Use the
setEnvName.sh
script to set the name of the new or existing conda environment:
./setEnvName.sh "yourEnvironmentName"
- Specify your Python package requirements for the development and the production respectively in
requirements/dev.in
andrequirements/prod.in
; - Use the
make
command to create and/or update all your Python packages (usemake force
if you want to force it):
make
If you have multiple Conda installed, use Conda-piptools inside the base Conda environment of the targeted Conda.