Discussion:
[conda] Package pinning when creating env from file
Simon Ho
2018-11-09 17:39:22 UTC
Permalink
When creating a new environment from a yaml file (conda env create -f
environment.yml), is it possible to additionally have conda pin the
packages to the versions specified within that file?

I know you can manually create a pinned file in conda-meta, but if I have
versions specified in environment.yml, it would seem sensible to also
automatically pin those packages during env creation
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/c57e319c-7145-419f-9b91-5c0f95ae5e4a%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Chris Withers
2018-11-10 10:19:09 UTC
Permalink
Hi Simon,
Post by Simon Ho
When creating a new environment from a yaml file (conda env create -f
environment.yml), is it possible to additionally have conda pin the
packages to the versions specified within that file?
I know you can manually create a pinned file in conda-meta, but if I
have versions specified in environment.yml, it would seem sensible to
also automatically pin those packages during env creation
My experience has been that this is exactly how it works, can you give
some examples where it has not?

cheers,

Chris
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/bf898a4d-3910-3f78-dd39-d85dd13d2389%40withers.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
'Simon Ho' via conda - Public
2018-11-10 10:28:55 UTC
Permalink
For example, my environment.yml file might contain something like:

channels:
- defaults
- conda-forge
dependencies:
- numpy=1.12.*



When I create the env from file, it installs numpy 1.12.1, which is
correct. However, when I look in conda-meta, I dont see a pinned file.
Additionally, when I activate the env and run conda update numpy, it tries
to update numpy to 1.15.4

My expectation is that numpy will be pinned automatically so that it cant
accidentally be updated to any version greater 1.12.*
Post by Chris Withers
Hi Simon,
Post by Simon Ho
When creating a new environment from a yaml file (conda env create -f
environment.yml), is it possible to additionally have conda pin the
packages to the versions specified within that file?
I know you can manually create a pinned file in conda-meta, but if I
have versions specified in environment.yml, it would seem sensible to
also automatically pin those packages during env creation
My experience has been that this is exactly how it works, can you give
some examples where it has not?
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/4c4d65a7-4f68-47a0-aed8-52b00536a714%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Chris Withers
2018-11-10 10:36:27 UTC
Permalink
|
-defaults
-conda-forge
-numpy=1.12.*
|
When I create the env from file, it installs numpy 1.12.1, which is
correct. However, when I look in conda-meta, I dont see a pinned file.
Additionally, when I activate the env and run conda update numpy, it
tries to update numpy to 1.15.4
My expectation is that numpy will be pinned automatically so that it
cant accidentally be updated to any version greater 1.12.*
Ah, okay, yeah, conda doesn't currently support that pattern, but I
wrote a thin layer over it that does:

https://picky-conda.readthedocs.io/en/latest/

cheers,

Chris
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/09b546bc-ca09-f8bb-4509-7b6871631d07%40withers.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...