conda-store icon indicating copy to clipboard operation
conda-store copied to clipboard

Issue when building environments "channel ... not recognized in database"

Open costrouc opened this issue 2 years ago • 3 comments

image

costrouc avatar May 05 '22 22:05 costrouc

What is the expected behavior ? Is the build supposed to fail, but catching the exception ? Or should the channel be added in the database ?

pierrotsmnrd avatar May 06 '22 08:05 pierrotsmnrd

Going to add a little more info here, as this has become a blocking issue for me:

dependencies:
- hvplot
- pip
- pip:
  - tqdm @ git+https://github.com/tqdm/tqdm@master
name: test-environment

Fails to build, but it seems like it only fails at the end of the build:

Traceback (most recent call last):
  File "/opt/conda-store-server/conda_store_server/build.py", line 179, in build_conda_environment
    set_build_completed(conda_store, build, output.encode("utf-8"), packages)
  File "/opt/conda-store-server/conda_store_server/build.py", line 45, in set_build_completed
    raise ValueError(
ValueError: channel url=https://repo.anaconda.com/pkgs/main not recognized in conda-store channel database

peytondmurray avatar Jun 20 '22 22:06 peytondmurray

@peytondmurray I could make this work by adding main in the list of channels :

channels:
- conda-forge
- main
dependencies:
- hvplot
- pip:
  - tqdm @ git+https://github.com/tqdm/tqdm@master
name: test-environment

@costrouc I have added extra logs to gather more informations :

ValueError: channel url=https://repo.anaconda.com/pkgs/main not recognized in conda-store channel database. 
Iterated package : {
    "build": "py310h9ce1e76_0",
    "build_number": 0,
    "constrains": [],
    "depends": ["openssl", "libgcc-ng", "python >=3.10,<3.11.0a0", "cffi >=1.12"],
    "license": "(BSD-3-Clause OR Apache-2.0) AND PSF-2.0 AND MIT",
    "license_family": None,
    "md5": "d79b4926a9e7c333e99f352261e9ecca",
    "sha256": "14ecbe0728c0d7e7a77a07816dae64f1e385e8da265cc7121b7cd581653aba4c",
    "name": "cryptography",
    "size": 1615371,
    "subdir": "linux-64",
    "timestamp": 1652101799.0,
    "version": "37.0.1",
    "channel_id": "https://repo.anaconda.com/pkgs/main",
    "summary": "Provides cryptographic recipes and primitives to Python developers",
    "description": 'Cryptography is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your\n"cryptographic standard library". It supports Python 3.6  and PyPy3 7.2 .\ncryptography includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests,\nand key derivation functions.\n',
}

It seems that the pip package tqdm has a dependency over cryptography from conda-main. What is the right way to handle this ? Should we add the missing channel into Conda Store ?

pierrotsmnrd avatar Jun 27 '22 07:06 pierrotsmnrd

Related: https://github.com/Quansight/conda-store/issues/275

kcpevey avatar Jul 06 '23 14:07 kcpevey

@steff456 @pierrotsmnrd Now that we have removed the restrictions on channels via #545 can you both please have a look at this issue and

  1. lmk if this is still an issue
  2. if so, discuss and work on a fix? if not, then we can close this issue

trallard avatar Aug 29 '23 09:08 trallard

I've tested the original environment in the current main branch and it is working without the need of adding the main channel.

channels:
  - conda-forge
dependencies:
  - hvplot
  - pip
  - pip:
      - tqdm @ git+https://github.com/tqdm/tqdm@master
  - ipykernel

I think this issue was resolved 🎉

steff456 avatar Aug 30 '23 17:08 steff456