Mybinder (and binderhub) fails for conda environment.yml containing python dependency


I have been hitting issues using binderhub to launch conda environments via an environment.yml file. To debug I created a minimal Gist containing the environment file and also tried this on and I see the same failures there.

The Gist is: conda env with python · GitHub

and binderhub (conda?) fails with the following error

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

    Traceback (most recent call last):
      File "/srv/conda/lib/python3.11/site-packages/conda/", line 16, in __call__
        return func(*args, **kwargs)
      File "/srv/conda/lib/python3.11/site-packages/conda_env/cli/", line 49, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/srv/conda/lib/python3.11/site-packages/conda/notices/", line 123, in wrapper
        return func(*args, **kwargs)
      File "/srv/conda/lib/python3.11/site-packages/conda_env/cli/", line 139, in execute
        result[installer_type] = installer.install(prefix, specs, args, env)
      File "/srv/conda/lib/python3.11/site-packages/mamba/", line 153, in mamba_install
    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=<not set>
           CURL_CA_BUNDLE=<not set>
               LD_PRELOAD=<not set>
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     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 :
       virtual packages : __archspec=1=x86_64
       base environment : /srv/conda  (writable)
      conda av data dir : /srv/conda/etc/conda
  conda av metadata url : None
           channel URLs :
          package cache : /srv/conda/pkgs
       envs directories : /srv/conda/envs
               platform : linux-64
             user-agent : conda/23.5.2 requests/2.31.0 CPython/3.11.6 Linux/5.15.0-79-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.

Note that the exact same environment file successfully creates an environment locally (python 3.9.15, conda 23.9.0)

I am wondering if this is a known issue? if it is binderhub related (I can reproduce on a different, recently deployed, binderhub instance too) or conda related?

I can get an (this) environment.yml working on by removing the python dependency.

[from the error trace] I note that python 3.11 is already the base python installed, I’m assuming that any python>=3.x would/should just be ignored normally?


1 Like

It had been discussed over in this thread, especially see the end. I don’t know though if the issue referenced in the thread was updated to include this or if there’s a separate one already filed?


The latest version of repo2docker includes an upgrade of mamba (not yet deployed to mybinder). If you have time it might be worth installing repo2docker from the main branch locally and seeing if that helps.

1 Like