LCAV / pyroomacoustics

Pyroomacoustics is a package for audio signal processing for indoor applications. It was developed as a fast prototyping platform for beamforming algorithms in indoor scenarios.

Home Page:https://pyroomacoustics.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pip install fails (in a new virtualenv)

enricguso opened this issue · comments

Hi, pip install fails even in a new environment. Any ideas? Thank you
pip install --upgrade pip
pip install pyroomacoustics

Using Ubuntu 20.04.3 LTS Python 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]. The error trace:

Collecting pyroomacoustics
  Using cached pyroomacoustics-0.6.0.tar.gz (1.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting Cython
  Using cached Cython-0.29.32-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting pybind11>=2.2
  Using cached pybind11-2.10.0-py3-none-any.whl (213 kB)
Collecting numpy
  Using cached numpy-1.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
Collecting scipy>=0.18.0
  Using cached scipy-1.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.8 MB)
Building wheels for collected packages: pyroomacoustics
  Building wheel for pyroomacoustics (pyproject.toml): started
  Building wheel for pyroomacoustics (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for pyroomacoustics (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [104 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/recognition.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/utilities.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/windows.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/multirate.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/sync.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/soundsource.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/room.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/parameters.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/metrics.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/directivities.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/beamforming.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/version.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      copying pyroomacoustics/acoustics.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/doa.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/tops.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/srp.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/plotters.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/frida.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/detect_peaks.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/utils.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/waves.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/music.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/tools_fri_doa_plane.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/cssm.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/normmusic.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      copying pyroomacoustics/doa/grid.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/doa
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/data_structures.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/lms.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/rls.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/adaptive_filter.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/util.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      copying pyroomacoustics/adaptive/subband_lms.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/adaptive
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/transform
      copying pyroomacoustics/transform/dft.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/transform
      copying pyroomacoustics/transform/stft.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/transform
      copying pyroomacoustics/transform/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/transform
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/physics.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/deconvolution.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/rt60.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/delay_calibration.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/localization.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/point_cloud.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/signals.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      copying pyroomacoustics/experimental/measure_ir.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/experimental
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      copying pyroomacoustics/datasets/cmu_arctic.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      copying pyroomacoustics/datasets/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      copying pyroomacoustics/datasets/base.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      copying pyroomacoustics/datasets/utils.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      copying pyroomacoustics/datasets/google_speech_commands.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      copying pyroomacoustics/datasets/timit.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/datasets
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/trinicon.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/common.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/auxiva.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/sparseauxiva.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/ilrma.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      copying pyroomacoustics/bss/fastmnmf.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/bss
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/denoise
      copying pyroomacoustics/denoise/iterative_wiener.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/denoise
      copying pyroomacoustics/denoise/spectral_subtraction.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/denoise
      copying pyroomacoustics/denoise/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/denoise
      copying pyroomacoustics/denoise/subspace.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/denoise
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/phase
      copying pyroomacoustics/phase/gl.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/phase
      copying pyroomacoustics/phase/__init__.py -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/phase
      copying pyroomacoustics/build_rir.pyx -> build/lib.linux-x86_64-cpython-38/pyroomacoustics
      creating build/lib.linux-x86_64-cpython-38/pyroomacoustics/data
      copying pyroomacoustics/data/materials.json -> build/lib.linux-x86_64-cpython-38/pyroomacoustics/data
      running build_ext
      creating tmp
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/ubuntu/enric/venvs/pyroomacoustics/include -I/usr/include/python3.8 -c /tmp/tmp6dy0h2vv.cpp -o tmp/tmp6dy0h2vv.o -std=c++14
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/ubuntu/enric/venvs/pyroomacoustics/include -I/usr/include/python3.8 -c /tmp/tmp3ufos64_.cpp -o tmp/tmp3ufos64_.o -fvisibility=hidden
      cythoning pyroomacoustics/build_rir.pyx to pyroomacoustics/build_rir.c
      building 'pyroomacoustics.libroom' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/pyroomacoustics
      creating build/temp.linux-x86_64-cpython-38/pyroomacoustics/libroom_src
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -Ipyroomacoustics/libroom_src -I/tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/pybind11/include -I/tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/pybind11/include -Ipyroomacoustics/libroom_src/ext/eigen -I/home/ubuntu/enric/venvs/pyroomacoustics/include -I/usr/include/python3.8 -c pyroomacoustics/libroom_src/libroom.cpp -o build/temp.linux-x86_64-cpython-38/pyroomacoustics/libroom_src/libroom.o -DEIGEN_MPL2_ONLY -Wall -O3 -DEIGEN_NO_DEBUG -DVERSION_INFO=\"0.6.0\" -std=c++14 -fvisibility=hidden
      In file included from /tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/detail/../attr.h:13,
                       from /tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/detail/class.h:12,
                       from /tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/pybind11.h:13,
                       from pyroomacoustics/libroom_src/libroom.cpp:29:
      /tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/detail/../detail/common.h:212:10: fatal error: Python.h: No such file or directory
        212 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      /tmp/pip-build-env-p1e_wumw/overlay/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-en5dsbw5/pyroomacoustics_a7e79c63a48b41c29aa11ad82573f98e/pyroomacoustics/build_rir.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      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 pyroomacoustics
Failed to build pyroomacoustics
ERROR: Could not build wheels for pyroomacoustics, which is required to install pyproject.toml-based projects

Hi @enricguso , I think you might be missing the header for python. Please see this topic on SO here.

In short, do

sudo apt-get install python3-dev  # for python3.x installs

and try the install again.

True, something was broken in the miniconda... Uninstalled it and used normal python and it worked. Thank you very much :)