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

[BUG] Conda-lock env solver fails to resolve drjit dependency for OSX using pip. #342

Open
wint3ria opened this issue Jun 19, 2023 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@wint3ria
Copy link
Contributor

Bug report

Summary

          As a result of the poetry solver issue, users who may want to use the conda environments `optional` or `dependencies` (from the locks or the env yaml files) will need to perform the installation of the `eradiate-mitsuba` pkg on their own using pip. This is a very minor issue, since these conda environments are only provided for rare corner cases. The `dependencies` layer is used for the wheel main deps list, its purpose isn't to be installed this way with conda. The `optional` layer is only a convenience layer, and most likely won't be used. The new option `-p` for `pip-deps` allow the script to generate conda envs with the pip deps when the solver will be fixed. Complete `dependencies` and `optional` environments can be setup using the pip locks anyway.

Originally posted by @wint3ria in #338 (comment)

Description

We can not recreate the lock files for OSX using conda-lock for now. This is due to a failure in conda-lock to retrieve the DrJIT package for the platform. Wheels are indeed generated for DrJIT on OSX.

An issue has been posted here conda/conda-lock#436 by @leroyvn

Steps to reproduce

Recreating the lock files for OSX wil fail with the following traceback:

conda-lock --kind explicit --no-mamba --file requirements/conda/environment-dependencies.yml --filename-template "requirements/conda/environment-dependencies-{platform}.lock" -p osx-64
Locking dependencies for ['osx-64']...
INFO:conda_lock.conda_solver:osx-64 using specs ['python 3.8.*', 'pip *', 'aenum', 'attrs >=22.2', 'click', 'dessinemoi >=23.1.0', 'environ-config', 'lazy_loader >=0.1', 'matplotlib >=3.3', 'netcdf4', 'numpy', 'pint', 'pinttrs >=23.2.0', 'pooch', 'portion', 'rich', 'ruamel.yaml', 'scipy', 'shellingham !=1.5.1', 'tqdm', 'typer >=0.9.0', 'xarray >=0.19,!=0.20.*']
Traceback (most recent call last):
  File "/home/msp/.conda/envs/eradiate/bin/conda-lock", line 10, in <module>
    sys.exit(main())
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/conda_lock.py", line 1266, in lock
    lock_func(
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/conda_lock.py", line 996, in run_lock
    make_lock_files(
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/conda_lock.py", line 359, in make_lock_files
    lock_content = lock_content | create_lockfile_from_spec(
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/conda_lock.py", line 746, in create_lockfile_from_spec
    deps = _solve_for_arch(
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/conda_lock.py", line 682, in _solve_for_arch
    pip_deps = solve_pypi(
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/pypi_solver.py", line 294, in solve_pypi
    link = chooser.choose_for(op.package)
  File "/home/msp/.conda/envs/eradiate/lib/python3.8/site-packages/conda_lock/_vendor/poetry/installation/chooser.py", line 72, in choose_for
    raise RuntimeError(
RuntimeError: Unable to find installation candidates for drjit (0.4.1)

This only affects the dependencies and optional environment locks on OSX.

Workaround

Use pip locks on OSX instead, or manually install the eradiate-mitsuba package using pip on OSX

Proposed solutions

  • Fix the conda-lock solver
  • Create a Mitsuba & DrJIT packages for conda so that we can get rid of the pip deps for this solver

System configuration

@wint3ria wint3ria added the bug 🐛 Something isn't working label Jun 19, 2023
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

1 participant