Conda replaces git url with package name in yml file after conda export

Viewed 888

I have created a conda environment using a manually made environment.yml file. In that file I have added (under the 'pip' tag) a github repo containing a repo that I need for my project. A snippet of the file looks like this:

- pip:
   - git+https://github.com/microsoft/recommenders

Which basically means that, when I create a new environment, pip will use the 'pip install git+https://github.com/microsoft/recommenders' command.

However I have now added some new packages and would like to update my environment.yml with these new packages, so I call conda env export > environment.yml.

The thing is, when I run this command, suddenly in my environment.yml file, the git+ line is gone and replaced with reco-utils==2019.9, so when I call conda install -f environment.yml Conda returns an error since it can't find the reco-utils package because it's not a git url anymore.

Is there a way for Conda to keep the git url so that I can export my project dependencies without having to manually add the git dependency again?

0 Answers
Related