Parselmouth icon indicating copy to clipboard operation
Parselmouth copied to clipboard

"ERROR: Failed building wheel for praat-parselmouth" on Ubuntu

Open yayuanli opened this issue 1 year ago • 1 comments

Hi community,

I came across ERROR: Failed building wheel for praat-parselmouth when I do pip install praat-parselmouth or pip install praat-parselmouth==0.4.2.

OS: Ubuntu-22.04.2 Python: 3.10.6

Full output (too long to fit here): google doc

Any idea why this happened and how to solve it? I will appreciate any discussion.

Thank you

yayuanli avatar Jul 07 '23 08:07 yayuanli

Hi @yayuanli! Is there any reason you're building the wheel yourself, rather than using the binary wheels on PyPI? Are you on some particular platform (which might also explain the error)?

From what I can see from the error (thanks for including the full, long error message; extremely useful!), the X11/Xlib.h header is lacking, so one way of solving this is to sudo apt install libx11-dev on your Ubuntu.

However, the larger question/issue is why this dependency is there. I think it's a leftover from using the Praat code, and I actually removed it at some point on my development branch: https://github.com/YannickJadoul/Parselmouth/commit/6a94d3b3f78124aff5582d7a31b50e17235c5503. But it seems this hasn't made it into a release yet (as I've hardly had time to work on Parselmouth over the last 2 years, so haven't found time to make new minor release). At any rate it's another option, if you do not wish to install libx11-dev: download the source code of the latest release (https://github.com/YannickJadoul/Parselmouth/tree/v0.4.3), comment out this sendpraat.c in parselmouth/praat/sys/CMakeLists.txt (like in https://github.com/YannickJadoul/Parselmouth/commit/6a94d3b3f78124aff5582d7a31b50e17235c5503), and pip install that adapted source folder.

YannickJadoul avatar Jul 09 '23 20:07 YannickJadoul