Toporin / Seedkeeper-Tool

Windows, Linux & Mac GUI application to use a Seedkeeper (seedkeeper.io)
GNU Lesser General Public License v3.0
7 stars 3 forks source link

When installing the requirements I get this "ERROR: Failed building wheel for pyscard" #10

Closed abradshaw closed 9 months ago

abradshaw commented 9 months ago

Here is the full output

$  python3 -m pip install -r ./contrib/requirements/requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting PyQRCode==1.2.1 (from -r ./contrib/requirements/requirements.txt (line 1))
  Using cached PyQRCode-1.2.1-py3-none-any.whl
Collecting pypng==0.0.20 (from -r ./contrib/requirements/requirements.txt (line 2))
  Using cached pypng-0.0.20-py3-none-any.whl (70 kB)
Collecting mnemonic==0.19 (from -r ./contrib/requirements/requirements.txt (line 3))
  Using cached mnemonic-0.19-py2.py3-none-any.whl (61 kB)
Collecting ecdsa==0.15 (from -r ./contrib/requirements/requirements.txt (line 4))
  Using cached ecdsa-0.15-py2.py3-none-any.whl (100 kB)
Collecting pyscard==1.9.9 (from -r ./contrib/requirements/requirements.txt (line 5))
  Using cached pyscard-1.9.9.tar.gz (145 kB)
  Preparing metadata (setup.py) ... done
Collecting pysatochip==0.12.3 (from -r ./contrib/requirements/requirements.txt (line 6))
  Using cached pysatochip-0.12.3-py3-none-any.whl (55 kB)
Requirement already satisfied: certifi in /usr/lib/python3.12/site-packages (from -r ./contrib/requirements/requirements.txt (line 7)) (2023.5.7)
Collecting PySimpleGUIQt==0.31.0 (from -r ./contrib/requirements/requirements.txt (line 10))
  Using cached PySimpleGUIQt-0.31.0-py3-none-any.whl (79 kB)
Collecting PySide2==5.12.6 (from -r ./contrib/requirements/requirements.txt (line 11))
  Using cached PySide2-5.12.6-5.12.6-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl (147.8 MB)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3.12/site-packages (from ecdsa==0.15->-r ./contrib/requirements/requirements.txt (line 4)) (1.16.0)
Collecting pyaes==1.6.1 (from pysatochip==0.12.3->-r ./contrib/requirements/requirements.txt (line 6))
  Using cached pyaes-1.6.1-py3-none-any.whl
Collecting cryptography==3.3.2 (from pysatochip==0.12.3->-r ./contrib/requirements/requirements.txt (line 6))
  Using cached cryptography-3.3.2-cp36-abi3-manylinux2010_x86_64.whl (2.6 MB)
Collecting pyopenssl==20.0.0 (from pysatochip==0.12.3->-r ./contrib/requirements/requirements.txt (line 6))
  Using cached pyOpenSSL-20.0.0-py2.py3-none-any.whl (54 kB)
Collecting shiboken2==5.12.6 (from PySide2==5.12.6->-r ./contrib/requirements/requirements.txt (line 11))
  Using cached shiboken2-5.12.6-5.12.6-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl (796 kB)
Requirement already satisfied: cffi>=1.12 in /usr/lib64/python3.12/site-packages (from cryptography==3.3.2->pysatochip==0.12.3->-r ./contrib/requirements/requirements.txt (line 6)) (1.15.1)
Requirement already satisfied: pycparser in /usr/lib/python3.12/site-packages (from cffi>=1.12->cryptography==3.3.2->pysatochip==0.12.3->-r ./contrib/requirements/requirements.txt (line 6)) (2.20)
Requirement already satisfied: ply==3.11 in /usr/lib/python3.12/site-packages (from pycparser->cffi>=1.12->cryptography==3.3.2->pysatochip==0.12.3->-r ./contrib/requirements/requirements.txt (line 6)) (3.11)
Building wheels for collected packages: pyscard
  Building wheel for pyscard (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'smartcard.scard._scard' extension
      swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c
      swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
      creating build
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/smartcard
      creating build/temp.linux-x86_64-cpython-312/smartcard/scard
      gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fPIC -DVER_PRODUCTVERSION=1,9,9,0000 -DVER_PRODUCTVERSION_STR=1.9.9 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/usr/include/python3.12 -c smartcard/scard/helpers.c -o build/temp.linux-x86_64-cpython-312/smartcard/scard/helpers.o
      smartcard/scard/helpers.c:31:10: fatal error: Python.h: No such file or directory
         31 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/lib64/ccache/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 pyscard
  Running setup.py clean for pyscard
Failed to build pyscard
ERROR: Could not build wheels for pyscard, which is required to install pyproject.toml-based projects
abradshaw commented 9 months ago

Seems I needed to install python3-devel

sudo dnf install python3-devel

Then it worked, will close this