salsergey / QCustomPlot-PyQt

Bindings for graphics lib QCustomPlot for PyQt5 and PyQt6
MIT License
9 stars 1 forks source link

pip install error #9

Open marcel-goldschen-ohm opened 6 months ago

marcel-goldschen-ohm commented 6 months ago

pip install in fresh conda environment with python3.12.1 and PyQt6.6.1 fails:

% pip install QCustomPlot_PyQt6 --verbose
Using pip 23.3.2 from /opt/miniconda3/envs/test2/lib/python3.12/site-packages/pip (python 3.12)
Collecting QCustomPlot_PyQt6
  Using cached QCustomPlot_PyQt6-2.1.1.1.tar.gz (477 kB)
  Running command pip subprocess to install build dependencies
  Collecting sip<7,>=5.0.0
    Using cached sip-6.8.1-py3-none-any.whl.metadata (3.2 kB)
  Collecting PyQt-builder<2,>=1.6
    Using cached PyQt_builder-1.15.4-py3-none-any.whl.metadata (1.8 kB)
  Collecting PyQt6
    Using cached PyQt6-6.6.1-cp38-abi3-macosx_10_14_universal2.whl.metadata (2.1 kB)
  Collecting packaging (from sip<7,>=5.0.0)
    Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
  Collecting setuptools (from sip<7,>=5.0.0)
    Using cached setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
  Collecting PyQt6-sip<14,>=13.6 (from PyQt6)
    Using cached PyQt6_sip-13.6.0-cp312-cp312-macosx_10_9_universal2.whl.metadata (503 bytes)
  Collecting PyQt6-Qt6>=6.6.0 (from PyQt6)
    Using cached PyQt6_Qt6-6.6.1-py3-none-macosx_11_0_arm64.whl.metadata (534 bytes)
  Using cached sip-6.8.1-py3-none-any.whl (573 kB)
  Using cached PyQt_builder-1.15.4-py3-none-any.whl (3.7 MB)
  Using cached PyQt6-6.6.1-cp38-abi3-macosx_10_14_universal2.whl (11.6 MB)
  Using cached PyQt6_Qt6-6.6.1-py3-none-macosx_11_0_arm64.whl (50.4 MB)
  Using cached PyQt6_sip-13.6.0-cp312-cp312-macosx_10_9_universal2.whl (133 kB)
  Using cached packaging-23.2-py3-none-any.whl (53 kB)
  Using cached setuptools-69.0.3-py3-none-any.whl (819 kB)
  Installing collected packages: PyQt6-Qt6, setuptools, PyQt6-sip, packaging, sip, PyQt6, PyQt-builder
  Successfully installed PyQt-builder-1.15.4 PyQt6-6.6.1 PyQt6-Qt6-6.6.1 PyQt6-sip-13.6.0 packaging-23.2 setuptools-69.0.3 sip-6.8.1
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command Preparing metadata (pyproject.toml)
  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...

  Building QCustomPlot_PyQt6 module.

  These bindings will be built: QCustomPlot.

  Making static qcustomplot library...

  Generating the QCustomPlot bindings...
  Generating the .pro file for the QCustomPlot_PyQt6 module...
  Generating the top-level .pro file...
  Generating the Makefiles...
  Compiling the project...
  Installing the project...
  Traceback (most recent call last):
    File "/opt/miniconda3/envs/test2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/opt/miniconda3/envs/test2/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 "/opt/miniconda3/envs/test2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 153, in prepare_metadata_for_build_wheel
      return _get_wheel_metadata_from_wheel(whl_basename, metadata_directory,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/miniconda3/envs/test2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 210, in _get_wheel_metadata_from_wheel
      whl_file = os.path.join(metadata_directory, whl_basename)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen posixpath>", line 90, in join
    File "<frozen genericpath>", line 164, in _check_arg_types
  TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
  error: subprocess-exited-with-error

  × Preparing metadata (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: /opt/miniconda3/envs/test2/bin/python3.12 /opt/miniconda3/envs/test2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/cq/0x3wj8sx1_dbbm61zp0zqbmm0000gn/T/tmpfx1fa7yl
  cwd: /private/var/folders/cq/0x3wj8sx1_dbbm61zp0zqbmm0000gn/T/pip-install-4cbt8co_/qcustomplot-pyqt6_417675bdc2d7452ea4bf2bfadbee6164
  Preparing metadata (pyproject.toml) ... error
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.
salsergey commented 5 months ago

I have experienced such errors. As for now, I don't know the exact reason. It seems that errors occur after the package is built and some cleaning procedure is executed. For example, if I run sip-wheel, I get such errors. However, wheels are built and I have them in current directory. Maybe you will be able to find a workaround as well.

marcel-goldschen-ohm commented 5 months ago

Thanks for the hint @salsergey . If I find the bandwidth to look into this, that will be helpful.