AlphaPose icon indicating copy to clipboard operation
AlphaPose copied to clipboard

ImportError: cannot import name 'deform_conv_cuda'

Open lofyol opened this issue 3 years ago • 8 comments

lofyol avatar Dec 09 '20 02:12 lofyol

https://github.com/MVIG-SJTU/AlphaPose/issues/492 Found this same error in this thread, but personally haven't gotten it to work yet. Have had more luck with tensorflow branch.

ToxicFyre avatar Dec 16 '20 00:12 ToxicFyre

@CCxiaoLL You need to run setup.py when installing the Alphapose. When you run the setup.py script, a function named 'get_ext_modules' will install some packages like 'deform_conv_cuda'.

wawaa avatar Jan 25 '21 12:01 wawaa

@wawaa I successfully run 'python setup.py develop', and everything is installed, but when I use from . import deform_conv_cuda, it still shows ImportError: cannot import name 'deform_conv_cuda' .

cmc370 avatar May 30 '21 14:05 cmc370

I also have the same question

ChiaChianChan avatar May 31 '21 12:05 ChiaChianChan

My pc don't have Nvidia, I deleted setup.py line 211: ext_modules=get_ext_modules(), and success run "python setup.py build develop", but the problem still exists.

SCP-KAKA avatar Nov 11 '21 03:11 SCP-KAKA

@wawaa could you please kindly tell me which environment you run this project..(which version of python, cuda, pytorch).. I've tried a whole day and end with no compatible environment...I'm totally confused...

koalaaaaaaaaa avatar Nov 14 '21 07:11 koalaaaaaaaaa

@wawaa could you please kindly tell me which environment you run this project..(which version of python, cuda, pytorch).. I've tried a whole day and end with no compatible environment...I'm totally confused...

In my impression, I should have installed the configuration recommended by the author. If you have no special requirements, maybe you can also try this.

wawaa avatar Nov 15 '21 07:11 wawaa

On Windows, set force_compile = True on line 124 def get_ext_modules(): ext_modules = [] # only windows visual studio 2013+ support compile c/cuda extensions # If you force to compile extension on Windows and ensure appropriate visual studio # is intalled, you can try to use these ext_modules. force_compile = True if platform.system() != 'Windows' or force_compile:

leoliu616 avatar Apr 25 '22 12:04 leoliu616