When I try to create a new environment using python 3.7, I get the following error:
$ conda create -n test python=3.7
Collecting package metadata: done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.7 -> libgcc-ng[version='>=7.3.0']
- python=3.7 -> libstdcxx-ng[version='>=7.3.0']
- python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a']
- python=3.7 -> sqlite[version='>=3.26.0,<4.0a0']
- python=3.7 -> tk[version='>=8.6.9,<8.7.0a0']
- python=3.7 -> xz[version='>=5.2.4,<5.3.0a0']
Current channels:
- https://conda.anaconda.org/conda-canary/linux-64
- https://conda.anaconda.org/conda-canary/noarch
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Manually digging into this, it looks like libgcc-ng and libstdcxx-ng are both missing from the repodata.json file. When I run conda create -n test sqlite, this installs sqlite 3.22.0, which seems to be the lates tversion of sqlite on conda-forge without an explicit dependency on libgcc-ng, so it looks like a missing libgcc-ng might be the problem?
I am running Ubuntu 18.04 on conda 4.6.10.
To add more context, whatever went wrong must have happened recently, because I've been installing Python 3.7 packages successfully for quite some time now (weeks/months maybe?).
I've also tried clearing my conda cache (conda clean -pity) to no success.
I'm assuming you don't have the default channel in your .condarc.conda-forge used to vendorize defaults compilers but thanks to conda >=4.6 we no longer have to do that, which was a bad idea to start with, you can have stable and safer environments by activating strict and having the default channel:
channel_priority: strict
channels:
- conda-forge
- defaults
Ah... thanks so much! TIL about channel_priority: strict...
Ah... thanks so much! TIL about
channel_priority: strict...
Sorry about the breakage. We had a bad workaround and we fixed in a way that caused this breakage, but the right was not available for conda <4.6.
PS: in conda 4.7 the strict channel will probably be enabled by default.
@ocefpaf, I think this needs to make its way into the documentation or be more prominent if it's already there. This also came up on gitter and I think it caught a lot of us by surprise.
@ocefpaf, I think this needs to make its way into the documentation or be more prominent if it's already there. This also came up on gitter and I think it caught a lot of us by surprise.
Indeed. We are discussing better ways to communicate this now but for this case I need to put some docs on strict and maybe create a blog post.
$ conda --version
conda 4.6.14
$ ...
EnvironmentSectionNotValid: The following section on '/home/joe/src/project/environment.yml' is invalid and will be ignored:
- channel_priority
# environment.yml
channel_priority: strict
@darrenleeweber, I don't think it works in an environment.yml, just in a .condarc (whether in your home directory or local).
@darrenleeweber, I don't think it works in an environment.yml, just in a .condarc (whether in your home directory or local).
It does not but this would be a nice feature to have. Pinging @jjhelmus and @msarahan who are considering this.
It does not but this would be a nice feature to have
I agree completely. I opened conda/conda#8675 to request this feature.
Most helpful comment
I agree completely. I opened conda/conda#8675 to request this feature.