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

error libmamba Non-conda folder exists at prefix #122

Open
njzjz opened this issue Oct 11, 2024 · 2 comments
Open

error libmamba Non-conda folder exists at prefix #122

njzjz opened this issue Oct 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@njzjz
Copy link

njzjz commented Oct 11, 2024

Description

I got the following error in readthedocs:

error    libmamba Non-conda folder exists at prefix
critical libmamba Aborting.
[LiteBuildApp] ERROR | [lite] [post_build] [jupyterlite-xeus] [ERR] Command '['/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/bin/mamba', 'create', '--yes', '--prefix', PosixPath('/tmp/tmp7yjenfp5/env/envs/dpdata-emscripten'), '-c', 'https://repo.mamba.pm/emscripten-forge', '-c', 'conda-forge']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/doit_cmd.py", line 294, in run
    return command.parse_execute(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/cmd_base.py", line 150, in parse_execute
    return self.execute(params, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/cmd_base.py", line 570, in execute
    return self._execute(**exec_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/cmd_run.py", line 265, in _execute
    return runner.run_all(self.control.task_dispatcher())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/runner.py", line 254, in run_all
    self.run_tasks(task_dispatcher)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/runner.py", line 213, in run_tasks
    node = task_dispatcher.generator.send(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/control.py", line 629, in _dispatcher_generator
    next_step = node.step()
                ^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/control.py", line 336, in step
    return next(self.generator)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/control.py", line 345, in _func
    for value in decorated(*args, **kwargs):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/control.py", line 473, in _add_task
    new_tasks = generate_tasks(to_load, task_gen, ref.__doc__)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/loader.py", line 390, in generate_tasks
    for task_dict, x_doc in flat_generator(gen_result, gen_doc):
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/doit/loader.py", line 27, in flat_generator
    for item in gen:
                ^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 138, in _delayed_gather
    yield from _gather()
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 131, in _gather
    raise error
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_core/manager.py", line 123, in _gather
    for task in getattr(addon, attr)(self):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 124, in post_build
    self.create_prefix()
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_xeus/add_on.py", line 148, in create_prefix
    create_conda_env_from_env_file(root_prefix, yaml_content, env_file.parent)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 55, in create_conda_env_from_env_file
    create_conda_env_from_specs(
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 71, in create_conda_env_from_specs
    _create_conda_env_from_specs_impl(
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 128, in _create_conda_env_from_specs_impl
    return _create_env_with_config(MAMBA_COMMAND, prefix_path, specs, channels_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/site-packages/jupyterlite_xeus/create_conda_env.py", line 141, in _create_env_with_config
    subprocess_run(
  File "/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/docs/checkouts/readthedocs.org/user_builds/dpdata/conda/735/bin/mamba', 'create', '--yes', '--prefix', PosixPath('/tmp/tmp7yjenfp5/env/envs/dpdata-emscripten'), '-c', 'https://repo.mamba.pm/emscripten-forge', '-c', 'conda-forge']' returned non-zero exit status 1.

subprocess_run(
[conda, "create", "--yes", "--prefix", prefix_path, *channels_args],
check=True,
)

This module creates a directory before mamba is run, but it seems that mamba doesn't allow it?

Reproduce

See build log: https://readthedocs.org/projects/dpdata/builds/25894998/

Expected behavior

no error.

Context

@njzjz njzjz added the bug Something isn't working label Oct 11, 2024
@njzjz
Copy link
Author

njzjz commented Oct 11, 2024

The workaround is to pin mamba<2. It seems a breaking change in mamba.

@DerThorsten
Copy link
Collaborator

The workaround is to pin mamba<2. It seems a breaking change in mamba.

@JohanMabille pinging you because this might be of interest to you

wanghan-iapcm pushed a commit to deepmodeling/dpdata that referenced this issue Oct 15, 2024
Fix the RTD build error. Pinning mamba to `<2` is a workaround for
jupyterlite/xeus#122.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Added a constraint specifying that the `python` dependency must be
less than version 3.13.
- Updated the Python version in the Read the Docs configuration to
`mambaforge-23.11`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants