Upgrade fails with Conda and Mamba version errors

I am trying to apply an upgrade to a TLJH installation from a year ago, running on Ubuntu 22.04.5.

Here’s the console log from running the bootstrap script:

/opt/tljh/user/lib/python3.10/site-packages/conda_package_streaming/package_streaming.py:19: UserWarning: zstandard could not be imported. Running without .conda support.
warnings.warn(“zstandard could not be imported. Running without .conda support.”)
/opt/tljh/user/lib/python3.10/site-packages/conda_package_handling/api.py:29: UserWarning: Install zstandard Python bindings for .conda support
_warnings.warn(“Install zstandard Python bindings for .conda support”)
Reinstalling conda==23.1.0, mamba==1.5.0 to ensure a consistent environment
Ran /opt/tljh/user/bin/mamba install --yes --force-reinstall -c conda-forge --prefix /opt/tljh/user conda==23.1.0 mamba==1.5.0 with exit code 1
/opt/tljh/user/lib/python3.10/site-packages/conda_package_streaming/package_streaming.py:19: UserWarning: zstandard could not be imported. Running without .conda support.
warnings.warn(“zstandard could not be imported. Running without .conda support.”)
/opt/tljh/user/lib/python3.10/site-packages/conda_package_handling/api.py:29: UserWarning: Install zstandard Python bindings for .conda support
_warnings.warn(“Install zstandard Python bindings for .conda support”)
/opt/tljh/user/lib/python3.10/site-packages/conda_package_streaming/package_streaming.py:19: UserWarning: zstandard could not be imported. Running without .conda support.
warnings.warn(“zstandard could not be imported. Running without .conda support.”)
/opt/tljh/user/lib/python3.10/site-packages/conda_package_handling/api.py:29: UserWarning: Install zstandard Python bindings for .conda support
_warnings.warn(“Install zstandard Python bindings for .conda support”)
conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
conda 23.1.0: overriding channel, version and build from installed packages due to --force-reinstall.
mamba 1.5.0: overriding channel, version and build from installed packages due to --force-reinstall.

Looking for: [‘conda==23.1.0’, ‘mamba==1.5.0’]

Pinned packages:

python 3.10.*

Could not solve for environment specs
The following packages are incompatible
├─ conda 23.1.0 py310hff52083_0 does not exist (perhaps a typo or a missing channel);
└─ mamba 1.5.0 py310h51d5547_0 does not exist (perhaps a typo or a missing channel).

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/opt/tljh/hub/lib/python3.10/site-packages/tljh/installer.py”, line 560, in 
main()
File “/opt/tljh/hub/lib/python3.10/site-packages/tljh/installer.py”, line 534, in main
ensure_user_environment(args.user_requirements_txt_url)
File “/opt/tljh/hub/lib/python3.10/site-packages/tljh/installer.py”, line 259, in ensure_user_environment
conda.ensure_conda_packages(
File “/opt/tljh/hub/lib/python3.10/site-packages/tljh/conda.py”, line 128, in ensure_conda_packages
utils.run_subprocess(
File “/opt/tljh/hub/lib/python3.10/site-packages/tljh/utils.py”, line 42, in run_subprocess
raise subprocess.CalledProcessError(cmd=cmd, returncode=proc.returncode)
subprocess.CalledProcessError: Command ‘[’/opt/tljh/user/bin/mamba’, ‘install’, ‘–yes’, ‘–force-reinstall’, ‘-c’, ‘conda-forge’, ‘–prefix’, ‘/opt/tljh/user’, ‘conda==23.1.0’, ‘mamba==1.5.0’]’ returned non-zero exit status 1.

https://anaconda.org/ is currently down, perhaps because of the AWS outage? Try again in a few hours.

Ah, thanks - hadn’t seen that.

I am trying upgrade TLJH installation, running on Ubuntu 22.04.5.

Existing TLJH installation detected, upgrading...
Upgrading pip...
Upgrading TLJH installer...
Running TLJH installer...
Granting passwordless sudo to JupyterHub admins...
Setting up user environment...
Reinstalling conda==24.11.3, mamba==1.5.9 to ensure a consistent environment
Ran /opt/tljh/user/bin/mamba install --yes --force-reinstall -c conda-forge --prefix /opt/tljh/user conda==24.11.3 mamba==1.5.9 with exit code 1
warning  libmamba Could not parse mod/etag header
warning  libmamba Could not parse mod/etag header
conda 24.11.3: overriding channel, version and build from installed packages due to --force-reinstall.
mamba 1.5.9: overriding channel, version and build from installed packages due to --force-reinstall.

Looking for: ['conda==24.11.3', 'mamba==1.5.9']


Pinned packages:
  - python 3.12.*


Could not solve for environment specs
The following packages are incompatible
├─ conda 24.11.3 py312h7900ff3_0 is requested and can be installed;
└─ mamba 1.5.9 py312h9460a1c_0 is not installable because it requires
   └─ conda >=24,<24.11.0 , which conflicts with any installable versions previously reported.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/tljh/hub/lib/python3.12/site-packages/tljh/installer.py", line 560, in <module>
    main()
  File "/opt/tljh/hub/lib/python3.12/site-packages/tljh/installer.py", line 534, in main
    ensure_user_environment(args.user_requirements_txt_url)
  File "/opt/tljh/hub/lib/python3.12/site-packages/tljh/installer.py", line 259, in ensure_user_environment
    conda.ensure_conda_packages(
  File "/opt/tljh/hub/lib/python3.12/site-packages/tljh/conda.py", line 128, in ensure_conda_packages
    utils.run_subprocess(
  File "/opt/tljh/hub/lib/python3.12/site-packages/tljh/utils.py", line 42, in run_subprocess
    raise subprocess.CalledProcessError(cmd=cmd, returncode=proc.returncode)
subprocess.CalledProcessError: Command '['/opt/tljh/user/bin/mamba', 'install', '--yes', '--force-reinstall', '-c', 'conda-forge', '--prefix', '/opt/tljh/user', 'conda==24.11.3', 'mamba==1.5.9']' returned non-zero exit status 1.