Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running bash install.sh #27

Open
CommandoHuan opened this issue Oct 27, 2020 · 5 comments
Open

Error when running bash install.sh #27

CommandoHuan opened this issue Oct 27, 2020 · 5 comments

Comments

@CommandoHuan
Copy link

Hello everyone, i just got the following error when running bash install.sh:

Compiling correlation kernels by nvcc...
Traceback (most recent call last):
File "build.py", line 3, in
import torch.utils.ffi
File "/home/huan/anaconda3/envs/myenv/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling resample2d kernels by nvcc...
Resample2d_kernel.cu:1:10: fatal error: THC.h: No such file or directory
#include <THC.h>
^~~~~~~
compilation terminated.
Traceback (most recent call last):
File "build.py", line 3, in
import torch.utils.ffi
File "/home/huan/anaconda3/envs/myenv/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling channelnorm kernels by nvcc...
ChannelNorm_kernel.cu:1:10: fatal error: THC.h: No such file or directory
#include <THC.h>
^~~~~~~
compilation terminated.
Traceback (most recent call last):
File "build.py", line 3, in
import torch.utils.ffi
File "/home/huan/anaconda3/envs/myenv/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling correlation kernels by nvcc...
Traceback (most recent call last):
File "build.py", line 3, in
import torch.utils.ffi
File "/home/huan/anaconda3/envs/myenv/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
(myenv) huan@HuanUbt:~/video-object-removal/inpainting$

Is anyone can help me?

@CommandoHuan
Copy link
Author

My PC is Ubuntu 18.04 LTS, Python 3.6, Pytorch 1.4, CUDA 10.1, GTX1070 GPU.

@OnlyFlashEobard
Copy link

change
from torch.utils.ffi import create_extension
to
from torch.utils.cpp_extension import BuildExtension
and change
ffi = create_extension(...)
to
ffi = BuildExtension(...)

@dueToLife
Copy link

I used to meet this also. It's because your nvcc can't find THC.h and THCGeneric.h. see this line and this line. Check if it is a true path of pytorch:

print(os.path.dirname(torch.__file__))

@dueToLife
Copy link

And due to your high pytorch version,some api was deprecated,use their substitute in pytorch 1.0+

@CommandoHuan
Copy link
Author

Thank all bros. Let me do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants