The Python Oracle

Installing pysox on ubuntu via pip install, cannot resolve sox.h

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Meadow

--

Chapters
00:00 Installing Pysox On Ubuntu Via Pip Install, Cannot Resolve Sox.H
01:41 Accepted Answer Score 6
02:10 Answer 2 Score 8
02:38 Thank you

--

Full question
https://stackoverflow.com/questions/1475...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #ubuntu #pip #sox

#avk47



ANSWER 1

Score 8


In case it helps, I had the same issue but got errors using:

sudo apt-get install libasound2-plugins libasound2-python libsox-fmt-all libsox-dev sox

I did get it to work though by dropping the libasound requests, which no longer appear to be available.

This is what worked for me... the process, I think, was:

pip3 install sox

sudo apt-get install sox libsox-fmt-all 

sudo apt-get install sox libsox-dev 

pip3 install pysox

Only took me about 11 hours to work that out.




ACCEPTED ANSWER

Score 6


Okay, this was to be expected: forgot to install the dev package for SoX, namely libsox-dev. It wasn't obvious to me at first because the standard package is sox, and the lib packages are all prefaced with libsox-fmt (and there is very little documentation on this).

anyway, this is everything you'll need on a Debian machine to get the proper files in place for pip/easy_install to package manage your modules properly for SoX:

sudo apt-get install libasound2-plugins libasound2-python libsox-fmt-all libsox-dev sox