I was provided with an environment.ubuntu.yml
file to be able to create a conda environment. However, running conda create env --file environment.ubuntu.y
I have met this issue and solved it. Firstly, I made my anaconda version to be consistent with where the yaml file export from. This may be useless but i consider that consistent conda version can promise consistent base environment. Secondly, i deleted all dependencies but some 'main' packages which are i actually want to use in my yaml file.That means let these 'main' package handle dependency issues.
This error and the subsequent behaviour is very likely coming from the Anaconda bug which from time to time causes inconsistencies in the local environment. As of Jan 26th, 2020 the bug was not yet resolved.
For me the same problem manifests profoundly on Mac.
For me worked best to do:
which python
(confirming that it was in the anaconda3 bin)
python --version
conda search "^python$"
Note which version matches the version (here 3.7.3) in use for Anaconda (since I'm making a new environment, it stands to reason that I could use the same version of Python that Anaconda itself is using). Note that my listing from the conda channels (conda search above) showed only one 3.7.3 line.
Then do this:
conda create -n myenv python=3.7.3 anaconda
Took about 1 minute to run the last command :)
In my case, I had replaced some of the build versions (the ...=he4413a7_1000
part) as the ones in the original file had been relabelled as broken
on conda-forge
. However, even though the version number hadn't changed for these dependencies, their subdependencies had changed, causing all these conflicts. The bottom line is: don't mess with dependencies manually.
I solved the problem by keeping the original build version specifications, and adding conda-forge/labels/broken
to the channels
part of the .yml
file.
For me adding the following to the yaml file worked:
channels:
- conda-forge
- defaults
- conda-forge/label/broken
In general, the answer to this question is that you should create your .yml from hand by scratch, with only the required channels and constraints. You should relax the version constraints so that they only look like 1.19 instead of 1.19.10
However, despite following this advice, I have almost exactly your problem right now. It spent many hours on fontconfig and I left it overnight before giving up. My spec is pretty simple:
channels:
- conda-forge
- usgs-astrogeology
- defaults
dependencies:
- python=3.6
- isis3
- gdal=2.3
I'll edit this when I figure it out.
EDIT: This problem is under discussion here (specific to the software I was trying to set up, probably not helpful for others) https://github.com/USGS-Astrogeology/ISIS3/issues/3570