pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
730 stars 165 forks source link

Cmake error with installing via Pip #207

Closed michel3vb closed 2 months ago

michel3vb commented 2 months ago

Hello,

I got the following error after trying to install Ruckig with Pip:

[pipenv.exceptions.InstallError]: Collecting ruckig==0.14.0 (from -r c:\users\mlangm~1.ad\appdata\local\temp\pipenv-uakm84fb-requirements\pipenv-bc7fdzds-hashed-reqs.txt (line 1))
[pipenv.exceptions.InstallError]:   Using cached ruckig-0.14.0.tar.gz (870 kB)
[pipenv.exceptions.InstallError]:   Installing build dependencies: started
[pipenv.exceptions.InstallError]:   Installing build dependencies: finished with status 'done'
[pipenv.exceptions.InstallError]:   Getting requirements to build wheel: started
[pipenv.exceptions.InstallError]:   Getting requirements to build wheel: finished with status 'done'
[pipenv.exceptions.InstallError]:   Installing backend dependencies: started
[pipenv.exceptions.InstallError]:   Installing backend dependencies: finished with status 'done'
[pipenv.exceptions.InstallError]:   Preparing metadata (pyproject.toml): started
[pipenv.exceptions.InstallError]:   Preparing metadata (pyproject.toml): finished with status 'done'
[pipenv.exceptions.InstallError]: Building wheels for collected packages: ruckig
[pipenv.exceptions.InstallError]:   Building wheel for ruckig (pyproject.toml): started
[pipenv.exceptions.InstallError]:   Building wheel for ruckig (pyproject.toml): finished with status 'error'
[pipenv.exceptions.InstallError]: Failed to build ruckig
[pipenv.exceptions.InstallError]: error: subprocess-exited-with-error
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   × Building wheel for ruckig (pyproject.toml) did not run successfully.
[pipenv.exceptions.InstallError]:   │ exit code: 1
[pipenv.exceptions.InstallError]:   ╰─> [20 lines of output]
[pipenv.exceptions.InstallError]:       WARNING: Use build.targets instead of cmake.targets for scikit-build-core >= 0.10
[pipenv.exceptions.InstallError]:       *** scikit-build-core 0.10.7 using CMake 3.30.3 (wheel)
[pipenv.exceptions.InstallError]:       *** Configuring CMake...
[pipenv.exceptions.InstallError]:       2024-09-25 15:26:43,994 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
[pipenv.exceptions.InstallError]:       loading initial cache file C:\Users\MLANGM~1.AD\AppData\Local\Temp\tmppr6_xyoa\build\CMakeInit.txt
[pipenv.exceptions.InstallError]:       -- Building for: NMake Makefiles
[pipenv.exceptions.InstallError]:       CMake Error at CMakeLists.txt:4 (project):
[pipenv.exceptions.InstallError]:         Running
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:          'nmake' '-?'
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:         failed with:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:          no such file or directory
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:       CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
[pipenv.exceptions.InstallError]:       -- Configuring incomplete, errors occurred!
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:       *** CMake configuration failed
[pipenv.exceptions.InstallError]:       [end of output]
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   note: This error originates from a subprocess, and is likely not a problem with pip.
[pipenv.exceptions.InstallError]:   ERROR: Failed building wheel for ruckig
[pipenv.exceptions.InstallError]: ERROR: Could not build wheels for ruckig, which is required to install pyproject.toml-based projects
ERROR: Couldn't install package: {}
 Package installation failed... 

Python 3.9 Windows 10

Any idea how to fix this error?

pantor commented 2 months ago

Looking at https://github.com/scikit-build/scikit-build-core/issues/900, it seems that pip is not able to find the MSVC toolchain for building Ruckig on your computer. Is MSVC or another compiler installed?

michel3vb commented 2 months ago

Installed MSVC and that fixed the problem. Thank you very much!