bitcraze / crazyflie-clients-python

Host applications and library for Crazyflie written in Python.
Other
301 stars 468 forks source link

ubuntu 18.04 pip3 install pyqt6 failed #692

Closed YBH6 closed 5 months ago

YBH6 commented 8 months ago

Hello,I am installing crazyflie-clients-python.when i run pip install pip3 install -e . ,it is failed. This error :

Collecting pyqt6~=6.5 (from cfclient==2023.11.post1+1e88847) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8c/2b/6fe0409501798abc780a70cab48c39599742ab5a8168e682107eaab78fca/PyQt6-6.6.1.tar.gz (1.0 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [31 lines of output] pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead Querying qmake about your Qt installation... Traceback (most recent call last): File "/home/uaslab/anaconda3/envs/crazyfile/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/uaslab/anaconda3/envs/crazyfile/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/uaslab/anaconda3/envs/crazyfile/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel project = AbstractProject.bootstrap('wheel', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap project.setup(pyproject, tool, tool_description) File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup self.apply_user_defaults(tool) File "/tmp/pip-install-iykbjmqp/pyqt6_3f931df9ce3c47cfb63a0fbc73878f7a/project.py", line 66, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults self.builder.apply_user_defaults(tool) File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 78, in apply_user_defaults self._get_qt_configuration() File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 497, in _get_qt_configuration for line in project.read_command_pipe([self.qmake, '-query']): File "/tmp/pip-build-env-8x4xiln7/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 554, in read_command_pipe raise UserException( sipbuild.exceptions.UserException [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

I'd be grateful if you would give me some solution.

knmcguire commented 8 months ago

Ai... we don't have an Ubuntu 18.04 to try this out and that is now pretty old.

Have you checked out the dependency list for QT6 ? Because that is what is failing right now apparently.

ataffanel commented 5 months ago

The minimum Python version supported by the client is 3.8 on Ubuntu 20.04. This also happens to be the minimum supported Python version for pyqt6's binary package. The error comes from pip trying to compile pyqt6 which is not something easy to achieve (it requires a lot of dependencies).

The solution is for you to update to Ubuntu 20.04 or 22.04. We strive to support the last 2 Ubuntu LTS, so when the imminent Ubuntu 24.04 is released, we will soon stop supporting 20.04 as well (it will likely work for the foreseeable future but we will not fix hard break if they occurs in 20.04).