Follow the git log
to see what encountering and resolving this issue looks like:
$ git log --oneline
6719385 (HEAD -> main) Fix conda-lock file by `rm conda-lock.yml && conda-lock`
ca3a030 `bump-my-version` is now on conda-forge! Remove `pip` section and re-lock
fa676c7 Initial commit with `pip` dependency
- Create an
environment.yml
file with apip
dependency, e.g.bump-my-version
. - Lock. Everything looks OK.
- Migrate that dependency out of the
pip
section, e.g. because that dependency became available onconda-forge
, and change the version. - Lock. There are now two copies of
bump-my-version
inconda-lock.yml
- Install from lockfile. The "old" version, which is no longer present in
environment.yml
, is installed. For me, this was very unexpected and took me a long time to understand why it was happening. - Remove the
conda-lock.yml
file and lock again. Everything looks OK again.
📝 There is a corresponding bug in
micromamba
in which it will install thepip
version butmicromamba list
will fib and tell me the version fromconda-forge
is installed.