Here's an excerpt from my environment.yml
:
name: my-project
channels:
- pytorch-nightly
- defaults
dependencies:
- pytorch=1.13.0.*
- pip:
- https://github.com/explosion/spacy-models/releases/download/nb_core_news_md-3.3.0/nb_core_news_md-3.3.0-py3-none-any.whl
prefix: ~/opt/miniconda3/envs/my-project
When I create my environment (conda env create -f environment.yml
) and re-export it to environment.yml
(conda env export > environment.yml
), the file gets changed:
name: my-project
channels:
- pytorch-nightly
- defaults
dependencies:
- pytorch=1.13.0.dev20220614=py3.9_0
- pip:
- nb-core-news-md==3.3.0
prefix: ~/opt/miniconda3/envs/my-project
Then, when I re-create my environment the next day, Conda complains that pytorch=1.13.0.dev20220614=py3.9_0
does not exist because it was replaced by a new PyTorch Preview (Nightly) build. dev20220614=py3.9_0
is no longer available.
Conda also complains that nb-core-news-md==3.3.0
does not exist. It was installed via a URL directly to the whl
. That URL was removed from the environment.yml
.
How can I prevent conda env export
from changing these two dependencies? I still want Conda to lock down the specifics for all other dependencies, just not for these two.