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

pip integration: The dependency name for ... does not match the actual package's name #489

Open
2 tasks done
mjlbach opened this issue Aug 26, 2023 · 6 comments
Open
2 tasks done

Comments

@mjlbach
Copy link
Contributor

mjlbach commented Aug 26, 2023

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

environment.yaml

channels:
  - defaults
  - pytorch
  - nvidia
  - fvcore
  - iopath
  - conda-forge
dependencies:
  - python=3.10
  - pip
  - pytorch=2.0.1=py3.10_cuda11.8_cudnn8.7.0_0
  - torchvision=0.15.2=py310_cu118
  - pytorch-cuda=11.8
  - fvcore
  - iopath
  - pip:
    - https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu118_pyt201/pytorch3d-0.7.4-cp310-cp310-linux_x86_64.whl

conda-lock yields

❯ conda-lock
/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/pydantic/_internal/_config.py:269: UserWarning: Valid config keys have changed in V2:
* 'allow_mutation' has been removed
  warnings.warn(message, UserWarning)
Locking dependencies for ['linux-64', 'osx-64', 'win-64']...
INFO:conda_lock.conda_solver:linux-64 using specs ['python 3.10.*', 'pip *', 'pytorch 2.0.1 py3.10_cuda11.8_cudnn8.7.0_0', 'torchvision 0.15.2 py310_cu118', 'pytorch-cuda 11.8.*', 'fvcore', 'iopath']
Traceback (most recent call last):
  File "/home/michael/.local/bin/conda-lock", line 8, in <module>
    sys.exit(main())
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 1332, in lock
    lock_func(
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 1040, in run_lock
    make_lock_files(
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 381, in make_lock_files
    lock_content = lock_content | create_lockfile_from_spec(
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 787, in create_lockfile_from_spec
    deps = _solve_for_arch(
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 721, in _solve_for_arch
    pip_deps = solve_pypi(
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/pypi_solver.py", line 335, in solve_pypi
    result = s.solve(use_latest=to_update)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/solver.py", line 65, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/solver.py", line 233, in _solve
    result = resolve_version(
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/mixology/__init__.py", line 7, in resolve_version
    return solver.solve()
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/mixology/version_solver.py", line 84, in solve
    next = self._choose_package_version()
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/mixology/version_solver.py", line 400, in _choose_package_version
    version = self._provider.complete_package(version)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/provider.py", line 454, in complete_package
    self.search_for_url(r)
  File "/home/michael/.local/pipx/venvs/conda-lock/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/provider.py", line 307, in search_for_url
    raise RuntimeError(
RuntimeError: The dependency name for pytorch3d-0-7-4-cp310-cp310-linux-x86-64-whl does not match the actual package's name: pytorch3d

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

This is related to #488, one of the approaches is required for supporting pytorch3D via pip

@maresb
Copy link
Contributor

maresb commented Aug 27, 2023

Thanks a lot @mjlbach for these bug reports! I think the next step will be for me to finishing vendoring Poetry and see how many of these errors it fixes. I'm traveling for the next few weeks though.

@mjlbach
Copy link
Contributor Author

mjlbach commented Aug 27, 2023

Sorry for the deluge @maresb! Just wanted to provide a bunch of test cases

@maresb
Copy link
Contributor

maresb commented Aug 27, 2023

No apologies, I really do appreciate it, and it will be very helpful for building tests!

@chuckwondo
Copy link

I'm running into this same issue, and it looks like it's a Poetry bug that was fixed in Poetry 1.0.0: python-poetry/poetry#1405

Any updates here?

@maresb
Copy link
Contributor

maresb commented Jan 26, 2024

Poetry still needs to be revendored. 😞

Currently #390 has top priority. I want to do the revendoring soon afterwards, but unfortunately there is no timeline.

@chuckwondo
Copy link

No worries. Thanks for the prompt reply, and for an awesome tool. I can manage with a sub-optimal alternative approach until this issue is addressed.

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

3 participants