SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
756 stars 271 forks source link

python setup.py install failed #101

Closed wonderfulxue closed 5 years ago

wonderfulxue commented 5 years ago

After running python setup.py install on ubuntu 16.04 server, I failed: running build running build_py running build_ext building 'warpctc_pytorch._warp_ctc' extension gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wonderfulxue/warp-ctc/include -I/home/xxx/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/include -I/home/xxx/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/xxx/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/wonderfulxue/anaconda3/envs/torch/include/python3.6m -c src/binding.cpp -o build/temp.linux-x86_64-3.6/src/binding.o -std=c++11 -fPIC -DWARPCTC_ENABLE_GPU -DTORCH_EXTENSION_NAME=warpctc_pytorch._warp_ctc cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/binding.cpp:6:29: fatal error: torch/extension.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1

It says fatal error: torch/extension.h: No such file or directory, any idea how to fix this?

xiaoaoran commented 5 years ago

Same problem. Anyone knows how to fix it?

lorenlugosch commented 5 years ago

Same

lorenlugosch commented 5 years ago

OK, this seems to be related to PyTorch 1.0. If you are using PyTorch 0.4, just revert this repo to the previous commit: git commit ac045b6072b9bc3454fb9f9f17674f0d59373789 and then it will work.

vaibhav0195 commented 5 years ago

hey @lorenlugosch thanks it solved the issue . But i think you made a typo the command should be: git checkout ac045b6072b9bc3454fb9f9f17674f0d59373789

thanks for the help :)

lorenlugosch commented 5 years ago

Oops, good call, should be "checkout", not "commit".

wonderfulxue commented 5 years ago

Thx to both of you @lorenlugosch @vaibhav0195 . I'll leave this issue open for couple days in case someone else run into the same issue

SeanNaren commented 5 years ago

There are a few tags useful, make sure to install from them! https://github.com/SeanNaren/warp-ctc/tree/0.4.1

peter880805 commented 5 years ago

i found the problem is about the version , anyone

alice-cool commented 3 years ago

If i want to run in pytorch1.0.0, how do it work?