`make test` fails with `subprocess-exited-with-error`: `AssertionError: Could not find cmake executable!`
Peiffap opened this issue · comments
Gilles Peiffer commented
Bug description
When trying to run the full test suite locally from a fresh clone and virtual environment with all pip packages uninstalled, I run into an AssertionError
concerning the unavailability of cmake
. Manually fixing this with pip install cmake
then errors because it is unable to find a suitable version of onnx
.
What version are you seeing the problem on?
master
How to reproduce the bug
# clone the repo
$ git clone https://github.com/Lightning-AI/lightning.git
$ python -m venv lightning-venv
$ source lightning-venv/bin/activate
$ pip freeze > packages_to_uninstall.txt
$ pip uninstall -r packages_to_uninstall.txt -y
$ make test
Error messages and logs
[...]
Collecting onnx<1.15.0,>=0.14.0 (from -r requirements/pytorch/test.txt (line 11))
Using cached onnx-1.14.1.tar.gz (11.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "/export/home/gpeiffer/Documents/foss/lightning_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/export/home/gpeiffer/Documents/foss/lightning_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/export/home/gpeiffer/Documents/foss/lightning_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-l3uwacw2/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-l3uwacw2/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-l3uwacw2/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-l3uwacw2/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 85, in <module>
AssertionError: Could not find cmake executable!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
make: *** [Makefile:36: test] Error 1
Environment
Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow): -
#- PyTorch Lightning Version (e.g., 1.5.0): -
#- Lightning App Version (e.g., 0.5.2): -
#- PyTorch Version (e.g., 2.0): -
#- Python version (e.g., 3.9): 3.12.1
#- OS (e.g., Linux): Linux
#- CUDA/cuDNN version: -
#- GPU models and configuration: Nvidia Quadro RTX 5000
#- How you installed Lightning(`conda`, `pip`, source): source
#- Running environment of LightningApp (e.g. local, cloud): -
More info
Running
$ pip install cmake
$ make test
then errors out with (starting from the same "Collecting onnx[...]" line)
Collecting onnx<1.15.0,>=0.14.0 (from -r requirements/pytorch/test.txt (line 11))
Using cached onnx-1.14.1.tar.gz (11.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement onnxruntime<1.17.0,>=0.15.0 (from versions: 1.17.0, 1.17.1, 1.17.3, 1.18.0)
ERROR: No matching distribution found for onnxruntime<1.17.0,>=0.15.0
make: *** [Makefile:36: test] Error 1