greatscottgadgets/hackrf

Unable to pip install python_hackrf

Closed this issue · 1 comments

What would you like to know?

I am trying to pip install python-hackrf and I am getting the following error. I have the dependencies installed already. Help is highly appreciated. Entire output is below:

(radioconda) C:\Users\userx>pip install python_hackrf
Collecting python_hackrf
Using cached python_hackrf-1.2.1.tar.gz (36 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: python_hackrf
Building wheel for python_hackrf (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for python_hackrf (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
C:\Users\userx\AppData\Local\Temp\pip-build-env-i0h1v656\overlay\Lib\site-packages\setuptools\config_apply_pyprojecttoml.py:71: _MissingDynamic: dependencies defined outside of pyproject.toml is ignored.
!!

          ********************************************************************************
          The following seems to be defined outside of `pyproject.toml`:

          `dependencies = ['cython==0.29.36', 'numpy>=1.26']`

          According to the spec (see the link below), however, setuptools CANNOT
          consider this value unless `dependencies` is listed as `dynamic`.

          https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

          To prevent this problem, you can list `dependencies` under `dynamic` or alternatively
          remove the `[project]` table from your file and rely entirely on other means of
          configuration.
          ********************************************************************************

  !!
    _handle_missing_dynamic(dist, project_table)
  C:\Users\userx\AppData\Local\Temp\pip-build-env-i0h1v656\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:78: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
    corresp(dist, value, root_dir)
  running bdist_wheel
  running build
  running build_py
  creating build\lib.win-amd64-cpython-311\python_hackrf
  copying .\python_hackrf\__init__.py -> build\lib.win-amd64-cpython-311\python_hackrf
  copying .\python_hackrf\__main__.py -> build\lib.win-amd64-cpython-311\python_hackrf
  creating build\lib.win-amd64-cpython-311\python_hackrf\pyhackrf_tools
  copying .\python_hackrf\pyhackrf_tools\pyhackrf_info.py -> build\lib.win-amd64-cpython-311\python_hackrf\pyhackrf_tools
  copying .\python_hackrf\pyhackrf_tools\pyhackrf_operacake.py -> build\lib.win-amd64-cpython-311\python_hackrf\pyhackrf_tools
  copying .\python_hackrf\pyhackrf_tools\__init__.py -> build\lib.win-amd64-cpython-311\python_hackrf\pyhackrf_tools
  creating build\lib.win-amd64-cpython-311\python_hackrf\pylibhackrf
  copying .\python_hackrf\pylibhackrf\__android.py -> build\lib.win-amd64-cpython-311\python_hackrf\pylibhackrf
  copying .\python_hackrf\pylibhackrf\__init__.py -> build\lib.win-amd64-cpython-311\python_hackrf\pylibhackrf
  running egg_info
  writing python_hackrf.egg-info\PKG-INFO
  writing dependency_links to python_hackrf.egg-info\dependency_links.txt
  writing entry points to python_hackrf.egg-info\entry_points.txt
  writing top-level names to python_hackrf.egg-info\top_level.txt
  reading manifest file 'python_hackrf.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'python_hackrf.egg-info\SOURCES.txt'
  copying .\python_hackrf\pylibhackrf\pyhackrf.pyi -> build\lib.win-amd64-cpython-311\python_hackrf\pylibhackrf
  running build_ext
  cythoning python_hackrf/pylibhackrf/pyhackrf.pyx to python_hackrf/pylibhackrf\pyhackrf.c
  cythoning python_hackrf/pyhackrf_tools/pyhackrf_sweep.pyx to python_hackrf/pyhackrf_tools\pyhackrf_sweep.c
  cythoning python_hackrf/pyhackrf_tools/pyhackrf_transfer.pyx to python_hackrf/pyhackrf_tools\pyhackrf_transfer.c
  building 'python_hackrf.pylibhackrf.pyhackrf' extension
  creating build\temp.win-amd64-cpython-311\Release\python_hackrf\pylibhackrf
  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipython_hackrf/pylibhackrf -IC:\Users\userx\AppData\Local\Temp\pip-build-env-i0h1v656\overlay\Lib\site-packages\numpy\_core\include -IC:\Users\userx\AppData\Local\anaconda3\envs\radioconda\include -IC:\Users\userx\AppData\Local\anaconda3\envs\radioconda\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcpython_hackrf/pylibhackrf\pyhackrf.c /Fobuild\temp.win-amd64-cpython-311\Release\python_hackrf/pylibhackrf\pyhackrf.obj -w
  cl : Command line warning D9025 : overriding '/W3' with '/w'
  pyhackrf.c
  python_hackrf/pylibhackrf\pyhackrf.c(753): fatal error C1083: Cannot open include file: 'hackrf.h': No such file or directory
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python_hackrf
Failed to build python_hackrf
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (python_hackrf)

python_hackrf is not a project from Great Scott Gadgets. I suggest following up with the folks that create that software.