zllrunning / video-object-removal

Just draw a bounding box and you can remove the object you want to remove.
MIT License
2.66k stars 474 forks source link

Error when running bash install.sh #27

Open CommandoHuan opened 3 years ago

CommandoHuan commented 3 years ago

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

      ^~~~~~~

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

      ^~~~~~~

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 commented 3 years ago

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

OnlyFlashEobard commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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

CommandoHuan commented 2 years ago

Thank all bros. Let me do.