It looks like I spoke to soon. When I run
sudo pip install -e . --config-settings editable_mode=compat -vv
I get the following error:
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 139, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 340, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 263, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 290, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/build_ext.py", line 99, in run
_build_ext.run(self)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 151, in build_extension
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/user/pennylane-lightning', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/tmpmigozo5f.build-lib/pennylane_lightning', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DENABLE_WARNINGS=OFF', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DPYBIND11_FINDPYTHON=ON', '-GNinja', '-DCMAKE_MAKE_PROGRAM=/tmp/pip-build-env-jazjr65m/overlay/local/bin/ninja', '-DPL_BACKEND=lightning_gpu']' returned non-zero exit status 1.
/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py:973: _DebuggingTips: Problem in editable installation.
!!
********************************************************************************
An error happened while installing `PennyLane_Lightning_GPU` in editable mode.
The following steps are recommended to help debug this problem:
- Try to install the project normally, without using the editable mode.
Does the error still persist?
(If it does, try fixing the problem before attempting the editable mode).
- If you are using binary extensions, make sure you have all OS-level
dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
- Try the latest version of setuptools (maybe the error was already fixed).
- If you (or your project dependencies) are using any setuptools extension
or customization, make sure they support the editable mode.
After following the steps above, if the problem still persists and
you think this is related to how setuptools handles editable installations,
please submit a reproducible example
(see https://stackoverflow.com/help/minimal-reproducible-example) to:
https://github.com/pypa/setuptools/issues
See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
********************************************************************************
!!
cmd_obj.run()
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 273, in build_editable
return hook(wheel_directory, config_settings, metadata_directory)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 476, in build_editable
return self._build_with_temp_dir(
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 206, in <module>
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 139, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 340, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 263, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/editable_wheel.py", line 290, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/command/build_ext.py", line 99, in run
_build_ext.run(self)
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
File "/tmp/pip-build-env-jazjr65m/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 151, in build_extension
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/user/pennylane-lightning', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/tmpmigozo5f.build-lib/pennylane_lightning', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DENABLE_WARNINGS=OFF', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DPYBIND11_FINDPYTHON=ON', '-GNinja', '-DCMAKE_MAKE_PROGRAM=/tmp/pip-build-env-jazjr65m/overlay/local/bin/ninja', '-DPL_BACKEND=lightning_gpu']' returned non-zero exit status 1.
error: subprocess-exited-with-error
× Building editable for PennyLane_Lightning_GPU (pyproject.toml) 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.
full command: /usr/bin/python3 /usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /tmp/tmp8ro9hm55
cwd: /home/user/pennylane-lightning
Building editable for PennyLane_Lightning_GPU (pyproject.toml) ... error
ERROR: Failed building editable for PennyLane_Lightning_GPU
Failed to build PennyLane_Lightning_GPU
Remote version of pip: 24.3.1
Local version of pip: 24.3.1
Was pip installed by pip? True
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PennyLane_Lightning_GPU)
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
status = _inner_run()
File "/usr/local/lib/python3.10/dist-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
return self.run(options, args)
File "/usr/local/lib/python3.10/dist-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.10/dist-packages/pip/_internal/commands/install.py", line 434, in run
raise InstallationError(
pip._internal.exceptions.InstallationError: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PennyLane_Lightning_GPU)
Removed build tracker: '/tmp/pip-build-tracker-dekwwoqi'
I have tried running the command outside of editable mode, but that does not seem to help. I am now using python3.11.9 instead of 3.10.