Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not build wheels for spidev #45

Open
SWi7CHbladE opened this issue Sep 16, 2024 · 1 comment
Open

Could not build wheels for spidev #45

SWi7CHbladE opened this issue Sep 16, 2024 · 1 comment

Comments

@SWi7CHbladE
Copy link

pip install -r requirements.txt
Collecting pyusb (from -r requirements.txt (line 1))
Using cached pyusb-1.2.1-py3-none-any.whl.metadata (2.2 kB)
Collecting crcmod (from -r requirements.txt (line 2))
Using cached crcmod-1.7-py3-none-any.whl
Collecting python-periphery (from -r requirements.txt (line 3))
Using cached python_periphery-2.4.1-py2.py3-none-any.whl.metadata (1.5 kB)
Collecting spidev (from -r requirements.txt (line 4))
Using cached spidev-3.6.tar.gz (11 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pycryptodome (from -r requirements.txt (line 5))
Using cached pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB)
Collecting crccheck (from -r requirements.txt (line 6))
Using cached crccheck-1.3.0-py3-none-any.whl.metadata (5.5 kB)
Using cached pyusb-1.2.1-py3-none-any.whl (58 kB)
Using cached python_periphery-2.4.1-py2.py3-none-any.whl (36 kB)
Using cached pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
Using cached crccheck-1.3.0-py3-none-any.whl (21 kB)
Building wheels for collected packages: spidev
Building wheel for spidev (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for spidev (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
/tmp/pip-build-env-k73831v4/overlay/lib/python3.12/site-packages/setuptools/dist.py:452: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!

          ********************************************************************************
          Usage of dash-separated 'description-file' will not be supported in future
          versions. Please use the underscore name 'description_file' instead.
  
          By 2024-Sep-26, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    opt = self.warn_dash_deprecation(opt, section)
  running bdist_wheel
  running build
  running build_ext
  building 'spidev' extension
  creating build/temp.linux-x86_64-cpython-312
  x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/<username>/goodix-fp-dump/.venv/include -I/usr/include/python3.12 -c spidev_module.c -o build/temp.linux-x86_64-cpython-312/spidev_module.o
  spidev_module.c:28:10: fatal error: Python.h: No such file or directory
     28 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for spidev
Failed to build spidev
ERROR: Could not build wheels for spidev, which is required to install pyproject.toml-based projects

@Arusekk
Copy link

Arusekk commented Oct 25, 2024

sudo apt install python3-spidev if you want the failing package from your distro

or sudo apt install python3-dev if you want to build spidev from pip
(or dnf/yum/zypper install python3-devel whatever your package manager is)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants