I work in scientific computing, and I am effectively forced to use conda to install certain other maintained packages to do my job. If I want to work on my own package, I need a way for it to play nice with both the conda dependency solver and pip. I would want to simply conda install
the local package and use the conda dependency solver so that its compatible with the other software. However, I would also want to be able to otherwise pip install
the package and/or upload it to PYPI.
Is there a way to develop a standardized python package (using, e.g., pyproject.toml
and/or requirements.txt
files) compatible with a conda environment? I have searched and haven't found a clear prescription on how to do so.
For conda, one could also locally specify the required dependencies in a *.yml
file, but this option is not compatible with installation via pip. One would have to maintain dependencies in both a *.yml
file as well as a requirements.txt
file. This duplication results in manual maintenance and is error-prone.
Note that the conda develop command is officially supported by anaconda and on the surface looks like it could be used to address this problem; however, it is effectively deprecated and as of this writing doesn't seem to be supported on python 3.11.