facebookresearch / WavAugment

A library for speech data augmentation in time-domain
MIT License
640 stars 57 forks source link

python setup.py develop error #7

Closed BilalDendani closed 4 years ago

BilalDendani commented 4 years ago

Hello, I am trying to install WavAugment. I got the following outputs. (pytorch) [bilal@HP WavAugment]$ python setup.py develop which: no nvcc in (/home/bilal/anaconda3/envs/pytorch/bin:/home/bilal/anaconda3/condabin:/home/bilal/.local/bin:/home/bilal/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin) running develop running egg_info writing augment.egg-info/PKG-INFO writing dependency_links to augment.egg-info/dependency_links.txt writing requirements to augment.egg-info/requires.txt writing top-level names to augment.egg-info/top_level.txt reading manifest file 'augment.egg-info/SOURCES.txt' writing manifest file 'augment.egg-info/SOURCES.txt' running build_ext building 'augment_cpp' extension gcc -pthread -B /home/bilal/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/bilal/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/include -I/home/bilal/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/bilal/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/include/TH -I/home/bilal/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/include/THC -I/home/bilal/anaconda3/envs/pytorch/include/python3.8 -c augment/augment.cpp -o build/temp.linux-x86_64-3.8/augment/augment.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=augment_cpp -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ augment/augment.cpp:10:10: fatal error: sox.h: No such file or directory 10 | #include | ^~~ compilation terminated. error: command 'gcc' failed with exit status 1

Please, I am asking about the error.

eugene-kharitonov commented 4 years ago

Hello @BilalDendani, thanks for giving WavAugment a try!

From the output I see that libsox was not found at the time of installation. As indicated in README, it is absolutely required. Have you tried installing it? (eg sudo apt-get install sox libsox-dev libsox-fmt-all, depending on your system)

BilalDendani commented 4 years ago

Thank you so much for your quick answer, The sox package is installed this is the version (pytorch) [bilal@HP WavAugment]$ sox --version sox: SoX v14.4.2

eugene-kharitonov commented 4 years ago

Just to double-check: having sox installed does not imply that libsox-dev is also installed.

Could you please verify that you have sox.h where gcc can find it? Something like this command `gcc -print-prog-name=cc1plus` -v would give you the list directories where gcc would look for headers.

BilalDendani commented 4 years ago

that's the output (pytorch) [bilal@HP WavAugment]$ gcc -print-prog-name=cc1plus -v ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/9/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/9/../../../../x86_64-redhat-linux/include"

include "..." search starts here:

include <...> search starts here:

/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9 /usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/x86_64-redhat-linux /usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/backward /usr/lib/gcc/x86_64-redhat-linux/9/include /usr/local/include /usr/include End of search list.

eugene-kharitonov commented 4 years ago

To be sure, can you check that any of these directories contains sox.h?

BilalDendani commented 4 years ago

Thank you @eugene-kharitonov. I used Google colab code. It works.