spotify / pedalboard

🎛 🔊 A Python library for audio.
https://spotify.github.io/pedalboard
GNU General Public License v3.0
5.23k stars 262 forks source link

Errors with building wheels and running setup (linux) #143

Open DanAugustus opened 2 years ago

DanAugustus commented 2 years ago

Expected behaviour

Installing pedalboard with PiPy as instructed should work on any Linux OS.

Actual behaviour

ERROR when building wheel:

In file included from JUCE/modules/juce_audio_processors/juce_audio_processors.h:57, from JUCE/modules/juce_audio_processors/juce_audio_processors.cpp:41, from /tmp/pip-req-build-zjwxnu7w/pedalboard/juce_overrides/include_juce_audio_processors.cpp:1: JUCE/modules/juce_gui_basics/juce_gui_basics.h:319:12: fatal error: X11/Xlib.h: No such file or directory

include <X11/Xlib.h>

Steps to reproduce the behaviour

Run python3 -m pip install pedalboard on Raspbian GNU/Linux version 10

psobot commented 2 years ago

Hi @DanAugustus!

Pedalboard includes platform wheels for various versions of Python on Linux on both x86 and arm64 - in particular, we support Python 3.6 through 3.11 on arm64, which should include Raspbian. Which version of Python are you using?

Regardless of the binary wheels, if building from source, Pedalboard requires a set of Linux dependencies to be installed. While this should probably be communicated with a more helpful error message, Pedalboard should be installable after installing the following native dependencies:

apt-get install -y pkg-config libsndfile1 \
    libx11-dev libxrandr-dev libxinerama-dev \
    libxrender-dev libxcomposite-dev libxcb-xinerama0-dev \
    libxcursor-dev libfreetype6 libfreetype6-dev
DanAugustus commented 2 years ago

Hello @psobot Installing the dependencies was needed, it has been a while since I updated the device. I am running python 3.7. Either way, the real problem which I should have posted earlier is that I cannot successfully build a wheel when I try to install with pip. Should I close this issue and create a new one?

psobot commented 2 years ago

Thanks @DanAugustus - no need to open a new issue. Did the installation work as expected once the dependencies were installed?

Also a couple questions:

DanAugustus commented 2 years ago

Thank you for the support @psobot I have pip version 22.2.2. The response to get_platform is linux-armv7l. The response to pip install is that there are no matching distributions for pedalboard. Any attempts I made to manually install from the repository result in the wheel building never finishing.

psobot commented 2 years ago

Thanks @DanAugustus - still not exactly sure why building from source never finishes, but I notice that you're running on linux-armv7l - which is 32-bit Arm, and unfortunately not supported by our build tooling. Are you able to try:

python3 -m pip install --verbose pedalboard

to gather more debug information about where the build process is hanging?

DanAugustus commented 2 years ago

Using pip install just returns errors that no matching distribution was found: ERROR: Could not find a version that satisfies the requirements (from versions: none) ERROR: No matching distribution found for pedalboard

But I guess i glossed over the fact that I need a 64bit system. Sorry about that. I'll have to either upgrade or experiment with other, older repositories. The installation getting stuck was after I tried to manually run the setup.py. It makes sense that did not work if the hardware is not supported.

psobot commented 2 years ago

Sounds good! I don't know that 32-bit builds are actually unsupported, to be honest; we don't build wheels for 32-bit architectures, but I don't think that means that Pedalboard itself won't work on a 32-bit platform. Either way, it shouldn't just hang. 🙂