Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment.yml with only python >=x,<y fails #1301

Closed
bollwyvl opened this issue Jul 23, 2023 · 3 comments
Closed

environment.yml with only python >=x,<y fails #1301

bollwyvl opened this issue Jul 23, 2023 · 3 comments

Comments

@bollwyvl
Copy link
Contributor

Bug description

A very simple environment fails to build on BinderHub when python is expressed as a range:

channels:
  - conda-forge
  - nodefaults
dependencies:
  - python >=3.9,<3.10

Expected behaviour

A working vanilla environment with python.

Actual behaviour

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockervsy0c9rp'...
HEAD is now at b311f5b
Python version unspecified, using current default Python version 3.10. This will change in the future.Building conda environment for python=3.10
Using CondaBuildPack builder
Step 1/50 : FROM docker.io/library/buildpack-deps:bionic
 ---> 0f137f206fa8
Step 2/50 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 9a60f92d78f4
Step 3/50 : RUN apt-get -qq update &&     apt-get -qq install --yes --no-install-recommends locales > /dev/null &&     apt-get -qq purge &&     apt-get -qq clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 950fb7d941f4
Step 4/50 : RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen &&     locale-gen
 ---> Using cache
 ---> aad2c1ce6dff
Step 5/50 : ENV LC_ALL=en_US.UTF-8     LANG=en_US.UTF-8     LANGUAGE=en_US.UTF-8
 ---> Using cache
 ---> cb934374e1b5
Step 6/50 : ENV SHELL=/bin/bash
 ---> Using cache
 ---> 60a0cfa7ff62
Step 7/50 : ARG NB_USER
 ---> Using cache
 ---> 27c992051258
Step 8/50 : ARG NB_UID
 ---> Using cache
 ---> 626362bf33c6
Step 9/50 : ENV USER=${NB_USER}     HOME=/home/${NB_USER}
 ---> Using cache
 ---> 24abacc0f0c6
Step 10/50 : RUN groupadd         --gid ${NB_UID}         ${NB_USER} &&     useradd         --comment "Default user"         --create-home         --gid ${NB_UID}         --no-log-init         --shell /bin/bash         --uid ${NB_UID}         ${NB_USER}
 ---> Using cache
 ---> 5ba34ac3f7e1
Step 11/50 : RUN apt-get -qq update &&     apt-get -qq install --yes --no-install-recommends        gettext-base        less        unzip        > /dev/null &&     apt-get -qq purge &&     apt-get -qq clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 1a113221114c
Step 12/50 : EXPOSE 8888
 ---> Using cache
 ---> 43ece9cde4f1
Step 13/50 : ENV APP_BASE=/srv
 ---> Using cache
 ---> 5657b39a0484
Step 14/50 : ENV CONDA_DIR=${APP_BASE}/conda
 ---> Using cache
 ---> f8f78313702d
Step 15/50 : ENV NB_PYTHON_PREFIX=${CONDA_DIR}/envs/notebook
 ---> Using cache
 ---> 1c67ea477fb9
Step 16/50 : ENV NPM_DIR=${APP_BASE}/npm
 ---> Using cache
 ---> 4e5d9aece07c
Step 17/50 : ENV NPM_CONFIG_GLOBALCONFIG=${NPM_DIR}/npmrc
 ---> Using cache
 ---> b86f9c4bccc3
Step 18/50 : ENV NB_ENVIRONMENT_FILE=/tmp/env/environment.lock
 ---> Using cache
 ---> 80ae064b87a3
Step 19/50 : ENV MAMBA_ROOT_PREFIX=${CONDA_DIR}
 ---> Using cache
 ---> 4cafd175b65f
Step 20/50 : ENV MAMBA_EXE=${CONDA_DIR}/bin/mamba
 ---> Using cache
 ---> a2fd0ffb89ec
Step 21/50 : ENV CONDA_PLATFORM=linux-64
 ---> Using cache
 ---> e0bfd399f34a
Step 22/50 : ENV KERNEL_PYTHON_PREFIX=${NB_PYTHON_PREFIX}
 ---> Using cache
 ---> 3cc71cfd4d10
Step 23/50 : ENV PATH=${NB_PYTHON_PREFIX}/bin:${CONDA_DIR}/bin:${NPM_DIR}/bin:${PATH}
 ---> Using cache
 ---> 7ca083140a37
Step 24/50 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e10-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2factivate-2dconda-2esh-44e764 /etc/profile.d/activate-conda.sh
 ---> Using cache
 ---> 0cbd98e041a6
Step 25/50 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e10-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2fenvironment-2epy-2d3-2e10-2dlinux-2d64-2elock-388e0b /tmp/env/environment.lock
 ---> Using cache
 ---> 3242406b91b0
Step 26/50 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e10-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2finstall-2dbase-2denv-2ebash-e5509f /tmp/install-base-env.bash
 ---> Using cache
 ---> fbe47a0ddf87
Step 27/50 : RUN TIMEFORMAT='time: %3R' bash -c 'time /tmp/install-base-env.bash' && rm -rf /tmp/install-base-env.bash /tmp/env
 ---> Using cache
 ---> bee2cdf4ee28
Step 28/50 : RUN mkdir -p ${NPM_DIR} && chown -R ${NB_USER}:${NB_USER} ${NPM_DIR}
 ---> Using cache
 ---> 95f7e95b6a04
Step 29/50 : USER root
 ---> Using cache
 ---> 2120b46739b8
Step 30/50 : ARG REPO_DIR=${HOME}
 ---> Using cache
 ---> be02981960cc
Step 31/50 : ENV REPO_DIR=${REPO_DIR}
 ---> Using cache
 ---> 7c41df45494f
Step 32/50 : RUN if [ ! -d "${REPO_DIR}" ]; then         /usr/bin/install -o ${NB_USER} -g ${NB_USER} -d "${REPO_DIR}";     fi
 ---> Using cache
 ---> 7208f01def75
Step 33/50 : WORKDIR ${REPO_DIR}
 ---> Using cache
 ---> e3f692b0f6ac
Step 34/50 : RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR}
 ---> Using cache
 ---> f50acf41adcd
Step 35/50 : ENV PATH=${HOME}/.local/bin:${REPO_DIR}/.local/bin:${PATH}
 ---> Using cache
 ---> 7e582363e01c
Step 36/50 : ENV CONDA_DEFAULT_ENV=${KERNEL_PYTHON_PREFIX}
 ---> Using cache
 ---> 2ffbb645f077
Step 37/50 : COPY --chown=1000:1000 src/environment.yml ${REPO_DIR}/environment.yml
 ---> 6f6509589908
Step 38/50 : USER ${NB_USER}
 ---> Running in 0a38d4272e9d
Removing intermediate container 0a38d4272e9d
 ---> f8056503a786
Step 39/50 : RUN TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '
 ---> Running in b0383944f1b8

Looking for: ["python[version='>=3.9,<3.10']"]

Transaction

Prefix: /srv/conda/envs/notebook

Updating specs:

  • python[version='>=3.9,<3.10']

Package Version Build Channel Size
───────────────────────────────────────────────────────────────────────────────────────────
Change:
───────────────────────────────────────────────────────────────────────────────────────────

  • pycparser 2.21 pyhd8ed1ab_0 conda-forge
  • pycparser 2.21 pyhd8ed1ab_0 conda-forge 103kB
  • tornado 6.3.2 py310h2372a71_0 conda-forge
  • tornado 6.3.2 py39hd1e30aa_0 conda-forge 629kB
  • ruamel.yaml.clib 0.2.7 py310h1fa729e_1 conda-forge
  • ruamel.yaml.clib 0.2.7 py39h72bdee0_1 conda-forge 143kB
  • pyzmq 25.1.0 py310h5bbb5d0_0 conda-forge
  • pyzmq 25.1.0 py39hb257651_0 conda-forge 450kB
  • pyyaml 6.0 py310h5764c6d_5 conda-forge
  • pyyaml 6.0 py39hb9d737c_5 conda-forge 184kB
  • pyrsistent 0.19.3 py310h1fa729e_0 conda-forge
  • pyrsistent 0.19.3 py39h72bdee0_0 conda-forge 99kB
  • psutil 5.9.5 py310h1fa729e_0 conda-forge
  • psutil 5.9.5 py39h72bdee0_0 conda-forge 359kB
  • markupsafe 2.1.3 py310h2372a71_0 conda-forge
  • markupsafe 2.1.3 py39hd1e30aa_0 conda-forge 24kB
  • y-py 0.5.9 py310h4426083_0 conda-forge
  • y-py 0.5.9 py39h50f1755_0 conda-forge 1MB
  • greenlet 2.0.2 py310hc6cd4ac_1 conda-forge
  • greenlet 2.0.2 py39h3d6467e_1 conda-forge 190kB
  • debugpy 1.6.7 py310heca2aa9_0 conda-forge
  • debugpy 1.6.7 py39h227be39_0 conda-forge 2MB
  • cffi 1.15.1 py310h255011f_3 conda-forge
  • cffi 1.15.1 py39he91dace_3 conda-forge 235kB
  • argon2-cffi-bindings 21.2.0 py310h5764c6d_3 conda-forge
  • argon2-cffi-bindings 21.2.0 py39hb9d737c_3 conda-forge 35kB

Reinstall:
───────────────────────────────────────────────────────────────────────────────────────────

o wheel 0.40.0 pyhd8ed1ab_0 conda-forge
o setuptools 67.7.2 pyhd8ed1ab_0 conda-forge
o pip 23.1.2 pyhd8ed1ab_0 conda-forge
o zipp 3.15.0 pyhd8ed1ab_0 conda-forge
o widgetsnbextension 4.0.7 pyhd8ed1ab_0 conda-forge
o websocket-client 1.5.2 pyhd8ed1ab_0 conda-forge
o webencodings 0.5.1 py_1 conda-forge
o typing_extensions 4.6.3 pyha770c72_0 conda-forge
o traitlets 5.9.0 pyhd8ed1ab_0 conda-forge
o tomli 2.0.1 pyhd8ed1ab_0 conda-forge
o soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
o sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
o six 1.16.0 pyh6c4a22f_0 conda-forge
o send2trash 1.8.2 pyh41d4057_0 conda-forge
o rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
o pytz 2023.3 pyhd8ed1ab_0 conda-forge
o python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
o python-fastjsonschema 2.17.1 pyhd8ed1ab_0 conda-forge
o pysocks 1.7.1 pyha2e5f31_6 conda-forge
o pyjwt 2.7.0 pyhd8ed1ab_0 conda-forge
o pygments 2.15.1 pyhd8ed1ab_0 conda-forge
o pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
o ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
o prometheus_client 0.17.0 pyhd8ed1ab_0 conda-forge
o pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
o pickleshare 0.7.5 py_1003 conda-forge
o parso 0.8.3 pyhd8ed1ab_0 conda-forge
o pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
o pamela 1.0.0 py_0 conda-forge
o packaging 23.1 pyhd8ed1ab_0 conda-forge
o nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
o mistune 2.0.5 pyhd8ed1ab_0 conda-forge
o jupyterlab_widgets 3.0.7 pyhd8ed1ab_1 conda-forge
o json5 0.9.5 pyh9f0ad1d_0 conda-forge
o ipython_genutils 0.2.0 py_1 conda-forge
o idna 3.4 pyhd8ed1ab_0 conda-forge
o flit-core 3.9.0 pyhd8ed1ab_0 conda-forge
o executing 1.2.0 pyhd8ed1ab_0 conda-forge
o exceptiongroup 1.1.1 pyhd8ed1ab_0 conda-forge
o entrypoints 0.4 pyhd8ed1ab_0 conda-forge
o defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
o decorator 5.1.1 pyhd8ed1ab_0 conda-forge
o charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge
o certifi 2023.5.7 pyhd8ed1ab_0 conda-forge
o blinker 1.6.2 pyhd8ed1ab_0 conda-forge
o backports 1.0 pyhd8ed1ab_3 conda-forge
o backcall 0.2.0 pyh9f0ad1d_0 conda-forge
o attrs 23.1.0 pyh71513ae_1 conda-forge
o async_generator 1.10 py_0 conda-forge
o aiofiles 22.1.0 pyhd8ed1ab_0 conda-forge
o importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge
o importlib-metadata 6.6.0 pyha770c72_0 conda-forge
o tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
o typing-extensions 4.6.3 hd8ed1ab_0 conda-forge
o matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
o comm 0.1.3 pyhd8ed1ab_0 conda-forge
o beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
o rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
o python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
o asttokens 2.2.1 pyhd8ed1ab_0 conda-forge
o babel 2.12.1 pyhd8ed1ab_1 conda-forge
o urllib3 2.0.3 pyhd8ed1ab_0 conda-forge
o jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
o pexpect 4.8.0 pyh1a96a4e_2 conda-forge
o jedi 0.18.2 pyhd8ed1ab_0 conda-forge
o bleach 6.0.0 pyhd8ed1ab_0 conda-forge
o anyio 3.7.0 pyhd8ed1ab_1 conda-forge
o backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
o platformdirs 3.5.1 pyhd8ed1ab_0 conda-forge
o aiosqlite 0.19.0 pyhd8ed1ab_0 conda-forge
o stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
o requests 2.31.0 pyhd8ed1ab_0 conda-forge
o wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge
o ipython 8.14.0 pyh41d4057_0 conda-forge
o prompt-toolkit 3.0.38 pyha770c72_0 conda-forge
o terminado 0.17.1 pyh41d4057_0 conda-forge
o jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge
o mako 1.2.4 pyhd8ed1ab_0 conda-forge
o jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
o ypy-websocket 0.8.2 pyhd8ed1ab_0 conda-forge
o jupyter_ydoc 0.2.4 pyhd8ed1ab_0 conda-forge
o jupyter_client 8.2.0 pyhd8ed1ab_0 conda-forge
o pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge
o oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge
o argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge
o nbformat 5.9.0 pyhd8ed1ab_0 conda-forge
o jupyter_telemetry 0.1.0 pyhd8ed1ab_1 conda-forge
o jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge
o alembic 1.11.1 pyhd8ed1ab_0 conda-forge
o ipykernel 6.23.1 pyh210e3f2_0 conda-forge
o certipy 0.1.3 py_0 conda-forge
o nbclient 0.8.0 pyhd8ed1ab_0 conda-forge
o ipywidgets 8.0.6 pyhd8ed1ab_0 conda-forge
o jupyterhub-base 3.1.1 pyh2a2186d_0 conda-forge
o nbconvert-core 7.4.0 pyhd8ed1ab_0 conda-forge
o nbconvert-pandoc 7.4.0 pyhd8ed1ab_0 conda-forge
o jupyter_server 1.23.6 pyhd8ed1ab_0 conda-forge
o nbconvert 7.4.0 pyhd8ed1ab_0 conda-forge
o notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
o jupyterlab_server 2.22.1 pyhd8ed1ab_0 conda-forge
o jupyter_server_fileid 0.9.0 pyhd8ed1ab_0 conda-forge
o jupyter-resource-usage 0.7.1 pyhd8ed1ab_0 conda-forge
o nbclassic 1.0.0 pyhb4ecaf3_1 conda-forge
o jupyter_server_ydoc 0.8.0 pyhd8ed1ab_0 conda-forge
o notebook 6.5.4 pyha770c72_0 conda-forge
o jupyterlab 3.6.4 pyhd8ed1ab_0 conda-forge
o jupyter-offlinenotebook 0.2.2 pyh1d7be83_0 conda-forge
o jupyterhub-singleuser 3.1.1 pyh2a2186d_0 conda-forge

Upgrade:
───────────────────────────────────────────────────────────────────────────────────────────

  • jupyter_core 5.3.0 py310hff52083_0 conda-forge
  • jupyter_core 5.3.1 py39hf3d152e_0 conda-forge 92kB
  • ruamel.yaml 0.17.31 py310h2372a71_0 conda-forge
  • ruamel.yaml 0.17.32 py39hd1e30aa_0 conda-forge 200kB
  • sqlalchemy 2.0.15 py310h2372a71_0 conda-forge
  • sqlalchemy 2.0.19 py39hd1e30aa_0 conda-forge 3MB
  • cryptography 41.0.1 py310h75e40e8_0 conda-forge
  • cryptography 41.0.2 py39hd4f0224_0 conda-forge 2MB

Downgrade:
───────────────────────────────────────────────────────────────────────────────────────────

  • python 3.10.11 he550d4f_0_cpython conda-forge
  • python 3.9.16 h2782a2a_0_cpython conda-forge 24MB
  • python_abi 3.10 3_cp310 conda-forge
  • python_abi 3.9 3_cp39 conda-forge 6kB

Summary:

Change: 13 packages
Reinstall: 108 packages
Upgrade: 4 packages
Downgrade: 2 packages

Total download: 35MB

───────────────────────────────────────────────────────────────────────────────────────────

�[91m

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/srv/conda/lib/python3.11/site-packages/conda/exception_handler.py", line 16, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/srv/conda/lib/python3.11/site-packages/conda_env/cli/main.py", line 49, in do_call
    exit_code = getattr(module, func_name)(args, parser)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/conda/lib/python3.11/site-packages/conda/notices/core.py", line 123, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/srv/conda/lib/python3.11/site-packages/conda_env/cli/main_update.py", line 139, in execute
    result[installer_type] = installer.install(prefix, specs, args, env)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/conda/lib/python3.11/site-packages/mamba/mamba_env.py", line 153, in mamba_install
    transaction.fetch_extract_packages()
RuntimeError: Could not set URL (code: 14 - url = /wheel-0.40.0-pyhd8ed1ab_0.conda)

$ /srv/conda/bin/mamba update -p /srv/conda/envs/notebook --file environment.yml

environment variables:
CIO_TEST=
CONDA_AUTO_UPDATE_CONDA=false
CONDA_DEFAULT_ENV=/srv/conda/envs/notebook
CONDA_DIR=/srv/conda
CONDA_PLATFORM=linux-64
CONDA_ROOT=/srv/conda
CURL_CA_BUNDLE=
LD_PRELOAD=
PATH=/home/jovyan/.local/bin:/home/jovyan/.local/bin:/srv/conda/envs/notebo
ok/bin:/srv/conda/bin:/srv/npm/bin:/usr/local/sbin:/usr/local/bin:/usr
/sbin:/usr/bin:/sbin:/bin
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=

 active environment : None
   user config file : /home/jovyan/.condarc

populated config files : /srv/conda/.condarc
conda version : 23.5.2
conda-build version : not installed
python version : 3.11.4.final.0
virtual packages : __archspec=1=x86_64
__glibc=2.27=0
__linux=5.15.0=0
__unix=0=0
base environment : /srv/conda (writable)
conda av data dir : /srv/conda/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /srv/conda/pkgs
/home/jovyan/.conda/pkgs
envs directories : /srv/conda/envs
/home/jovyan/.conda/envs
platform : linux-64
user-agent : conda/23.5.2 requests/2.31.0 CPython/3.11.4 Linux/5.15.0-69-generic ubuntu/18.04.6 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

�[0m�[91mtime: 37.255
�[0mRemoving intermediate container b0383944f1b8
The command '/bin/sh -c TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '' returned a non-zero code: 1

How to reproduce

  • view this gist
  • click the binder badge

Your personal set up

  • OS: linux
  • Docker version: docker version binderhub
  • repo2docker version repo2docker --version binderhub

c/f robots-from-jupyter/robotkernel#145

@bollwyvl
Copy link
Contributor Author

the minimal reproducer above no longer appears to fail on binderhub, so I guess this is fixed?

@manics
Copy link
Member

manics commented Oct 23, 2023

Maybe the Mamba upgrade fixed it?
#1313

@bollwyvl
Copy link
Contributor Author

🤷 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants