Closed jakirkham closed 7 years ago
Also this example cropped up elsewhere. Looks like it is the same issue.
cc @synapticarbors
What does conda list -n root
show, @asmeurer?
Should add this is pretty strange as a couple lines earlier it accesses fn
. Since the traceback doesn't point there, we must have fn
. However it is magically gone a few lines later.
FWICT this is a conda-build-all
issue. Am going to move this over there and see what they think.
Would appreciate if both of you provide the conda
version in use. I'm unable to reproduce this with 4.1 or 4.2. However, with 4.3 I do get this error. That being said, AFAIK conda-build
doesn't even support 4.3. Given conda-build-all
and conda-smithy
are dependent on conda-build
, I'm not sure how they could support 4.3 either until conda-build
does. Would recommend downgrading to conda
4.2 until it can be sorted out.
Copying @msarahan and @kalefranz for awareness.
Looked at some of the code. Snippet from version_matrix.py
line 229
elif 'python' in requirement_specs:
py_spec = requirement_specs.pop('python')
for python_pkg in r.get_pkgs(py_spec):
py_vn = minor_vn(index[python_pkg.fn]['version'])
case = (('python', py_vn), )
add_case_if_soluble(case)
The get_pkgs()
method got renamed to get_dists_for_spec()
, but get_pkgs()
still exists for a while for backward compatibility. It now returns a Dist
object though, which is the index
key you want to use, not python_pkg.fn
. So (for now), the only fix needed in this code snippet is to change
py_vn = minor_vn(index[python_pkg.fn]['version'])
to
py_vn = minor_vn(index[python_pkg]['version'])
I have the same problem here https://github.com/conda-forge/mayavi-feedstock/pull/2
conda --version
conda 4.3.4
After downgrading to conda
to 4.2.15
, conda smithy rerender
works.
Good to know that conda-build
does not support conda 4.3
!
I think that my problem is that my ~/.condarc
is:
channels:
- defaults
- conda-forge
as a result, I have a mix of package from defaults
and conda-forge
:
$ conda list --show-channel-urls conda
# packages in environment at /home/dfroger/miniconda3:
#
anaconda-client 1.6.0 py35_0 defaults
conda 4.3.4 py35_0 defaults
conda-build 2.1.1 py35_0 defaults
conda-build-all 1.0.1 py35_1 conda-forge
conda-env 2.6.0 0 defaults
conda-smithy 2.0.0 py35_0 conda-forge
conda-verify 2.0.0 py35_0 defaults
I'll change my ~/.condarc
with:
channels:
- conda-forge
- defaults
and reinstally my root env.
The conda-build
from conda-forge
should prevent me to update conda
to 4.3
.
My root env is now:
# packages in environment at /home/dfroger/miniconda3:
#
anaconda-client 1.5.1 py35_0 conda-forge
conda 4.2.13 py35_0 conda-forge
conda-build 2.1.1 py35_0 conda-forge
conda-build-all 1.0.1 py35_1 conda-forge
conda-env 2.6.0 0 conda-forge
conda-smithy 2.0.0 py35_0 conda-forge
conda-verify 2.0.0 py35_0 defaults
and conda update conda
no more update to 4.3
.
Thanks for the pointer, @kalefranz. Seems simple enough.
As of conda-build
2.1.2, conda
4.3 is supported. So this is now a conda-build-all
issue alone.
cc-ing @jjhelmus for awareness.
Didn't realize the problem was that trivial. There will likely be other things you encounter though before you have full compatibility with conda 4.3.
Hello, Thanks for the fix in conda 4.3! Any ETA to make conda-build-all works with conda 4.3?
FYI In order to make conda-build-all works I have to pin conda to version to 4.2.13 (using latest conda-build is OK then install conda-build-all (not from a conda-forge 1.0.2 but from a private channel where I have published conda-forge to).
I think the first thing we need to do is adding a CI matrix item that tests against conda
4.3.x to see what the current issues are.
https://travis-ci.org/SciTools/conda-build-all/jobs/214380561
@kalefranz I think you're the man to ping here. In version_matrix:129 there is a call to conda.resolve.Resolve(index), which expects apparently another type, than what is passed in conda-build-all. Can you please point me into the right direction here?
For this particular stack trace I'm seeing, https://github.com/conda/conda/pull/4931 will fix it. Apparently conda-build-all is creating an index dict, or adding items to an index dict, with str keys. In conda 4.3, the key changed from a str to a conda.models.dist.Dist object. In addition to the PR in conda, you could figure out in the conda-build-all code where the index dict is being built and mutated, and then ensure the keys are wrapped with the Dist object.
Thank you @kalefranz. Your hints helped me to fix all tests.
The latest version of conda-build-all
(1.0.4) has conda
4.3 support. Thanks everyone for their work in making this happen.
From @asmeurer on January 16, 2017 4:8
I tried to rerender sphinxcontrib-autoprogram and got this error:
Copied from original issue: conda-forge/conda-smithy#435