pdm-project / pdm

A modern Python package and dependency manager supporting the latest PEP standards
https://pdm-project.org
MIT License
7.93k stars 398 forks source link

Error installing Taichi #1587

Closed Immortalin closed 1 year ago

Immortalin commented 1 year ago

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

Attempt to install the Taichi JIT compiler https://github.com/taichi-dev/taichi and Jax https://github.com/google/jax#installation pdm add taichi jax[cpu] ib-insync where taichi==0.8.3 and jax[cpu]==0.4.1 and ib-insync==0.9.81

Actual behavior

Fails with the following:

Adding packages to default dependencies: taichi
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   taichi
pdm.termui:   jax[cpu]>=0.4.1
pdm.termui:   ib-insync>=0.9.81
pdm.termui:   python>=3.10
pdm.termui:   Adding requirement taichi
pdm.termui:   Adding requirement jax[cpu]>=0.4.1
pdm.termui:   Adding requirement ib-insync>=0.9.81
pdm.termui:   Adding requirement python>=3.10
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui:   Adding requirement eventkit(from ib-insync 0.9.81)
pdm.termui:   Adding requirement nest-asyncio(from ib-insync 0.9.81)
pdm.termui: Pinning: ib-insync 0.9.81
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui:   Adding requirement jaxlib==0.4.1(from jax 0.4.1)
pdm.termui:   Adding requirement jax==0.4.1(from jax 0.4.1)
pdm.termui: Pinning: jax 0.4.1
pdm.termui: ======== Ending round 2 ========
pdm.termui: ======== Starting round 3 ========
pdm.termui:   Adding requirement numpy(from taichi 0.8.3)
pdm.termui:   Adding requirement pybind11>=2.5.0(from taichi 0.8.3)
pdm.termui:   Adding requirement sourceinspect>=0.0.4(from taichi 0.8.3)
pdm.termui:   Adding requirement colorama(from taichi 0.8.3)
pdm.termui:   Adding requirement astor(from taichi 0.8.3)
pdm.termui: Pinning: taichi 0.8.3
pdm.termui: ======== Ending round 3 ========
pdm.termui: ======== Starting round 4 ========
pdm.termui:   Adding requirement numpy>=1.20(from jax 0.4.1)
pdm.termui:   Adding requirement opt-einsum(from jax 0.4.1)
pdm.termui:   Adding requirement scipy>=1.5(from jax 0.4.1)
pdm.termui: Pinning: jax 0.4.1
pdm.termui: ======== Ending round 4 ========
pdm.termui: ======== Starting round 5 ========
pdm.termui:   Adding requirement scipy>=1.5(from jaxlib 0.4.1)
pdm.termui:   Adding requirement numpy>=1.20(from jaxlib 0.4.1)
pdm.termui: Pinning: jaxlib 0.4.1
pdm.termui: ======== Ending round 5 ========
pdm.termui: ======== Starting round 6 ========
pdm.termui: Pinning: numpy 1.24.1
pdm.termui: ======== Ending round 6 ========
pdm.termui: ======== Starting round 7 ========
pdm.termui: Pinning: pybind11 2.10.2
pdm.termui: ======== Ending round 7 ========
pdm.termui: ======== Starting round 8 ========
pdm.termui:   Adding requirement dill(from sourceinspect 0.0.4)
pdm.termui: Pinning: sourceinspect 0.0.4
pdm.termui: ======== Ending round 8 ========
pdm.termui: ======== Starting round 9 ========
pdm.termui: Pinning: astor 0.8.1
pdm.termui: ======== Ending round 9 ========
pdm.termui: ======== Starting round 10 ========
pdm.termui: Pinning: colorama 0.4.6
pdm.termui: ======== Ending round 10 ========
pdm.termui: ======== Starting round 11 ========
pdm.termui:   Adding requirement numpy(from eventkit 1.0.0)
pdm.termui: Pinning: eventkit 1.0.0
pdm.termui: ======== Ending round 11 ========
pdm.termui: ======== Starting round 12 ========
pdm.termui: Pinning: nest-asyncio 1.5.6
pdm.termui: ======== Ending round 12 ========
pdm.termui: ======== Starting round 13 ========
pdm.termui:   Adding requirement numpy<1.26.0,>=1.18.5(from scipy 1.9.3)
pdm.termui: Pinning: scipy 1.9.3
pdm.termui: ======== Ending round 13 ========
pdm.termui: ======== Starting round 14 ========
pdm.termui: Pinning: dill 0.3.6
pdm.termui: ======== Ending round 14 ========
pdm.termui: ======== Starting round 15 ========
pdm.termui:   Adding requirement numpy>=1.7(from opt-einsum 3.3.0)
pdm.termui: Pinning: opt-einsum 3.3.0
pdm.termui: ======== Ending round 15 ========
pdm.termui: ======== Starting round 16 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui:          python None
pdm.termui:       ib-insync 0.9.81
pdm.termui:        jax[cpu] 0.4.1
pdm.termui:          taichi 0.8.3
pdm.termui:             jax 0.4.1
pdm.termui:          jaxlib 0.4.1
pdm.termui:           numpy 1.24.1
pdm.termui:        pybind11 2.10.2
pdm.termui:   sourceinspect 0.0.4
pdm.termui:           astor 0.8.1
pdm.termui:        colorama 0.4.6
pdm.termui:        eventkit 1.0.0
pdm.termui:    nest-asyncio 1.5.6
pdm.termui:           scipy 1.9.3
pdm.termui:            dill 0.3.6
pdm.termui:      opt-einsum 3.3.0
🔒 Lock successful
Changes are written to pdm.lock.
Changes are written to pyproject.toml.
Synchronizing working set with lock file: 1 to add, 0 to update, 0 to remove

  ✖ Install taichi 0.8.3 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/installers/synchronizers.py", line 236, in install_candidate
    self.manager.install(can)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/installers/manager.py", line 39, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 359, in build
    self.obtain(allow_all=False)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 411, in obtain
    raise CandidateNotFound(
pdm.exceptions.CandidateNotFound: No candidate is found for `taichi` that matches the environment or hashes
Retry failed jobs
  ✖ Install taichi 0.8.3 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/installers/synchronizers.py", line 236, in install_candidate
    self.manager.install(can)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/installers/manager.py", line 39, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 359, in build
    self.obtain(allow_all=False)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 411, in obtain
    raise CandidateNotFound(
pdm.exceptions.CandidateNotFound: No candidate is found for `taichi` that matches the environment or hashes
Traceback (most recent call last):
  File "/home/user/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 259, in main
    return Core().main(args)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 191, in main
    raise cast(Exception, err).with_traceback(traceback)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 186, in main
    f(project, options)
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/commands/add.py", line 58, in handle
    actions.do_add(
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/actions.py", line 297, in do_add
    do_sync(
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/actions.py", line 213, in do_sync
    handler.synchronize()
  File "/home/user/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/installers/synchronizers.py", line 423, in synchronize
    raise InstallationError("Some package operations are not complete yet")
pdm.exceptions.InstallationError: Some package operations are not complete yet

Expected behavior

Environment Information

PDM version:
  2.3.4
Python Interpreter:
  /home/user/Development/Projects/my_project/.venv/bin/python (3.10)
Project Root:
  /home/user/Development/Projects/my_project
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.10.6",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.15.79.1-microsoft-standard-WSL2",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Wed Nov 23 01:01:46 UTC 2022",
  "python_full_version": "3.10.6",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "linux"
}
frostming commented 1 year ago

Expected, taichi 0.8.3 doesnt provide a wheel for Python 3.10 https://pypi.org/project/taichi/0.8.3/#files

The error message also indicates that: pdm.exceptions.CandidateNotFound: No candidate is found fortaichithat matches the environment or hashes