neural-motifs icon indicating copy to clipboard operation
neural-motifs copied to clipboard

make libraries

Open parseh123 opened this issue 6 years ago • 5 comments

Hi I used this repository in google golab, but I can not run this code and faced with this error:

%cd /content/neural-motifs/ !make

cd lib/fpn/nms; make make[1]: Entering directory '/content/neural-motifs/lib/fpn/nms' python build.py Traceback (most recent call last): File "build.py", line 3, in from torch.utils.ffi import cpp_extension ImportError: cannot import name 'cpp_extension' Makefile:2: recipe for target 'all' failed make[1]: *** [all] Error 1 make[1]: Leaving directory '/content/neural-motifs/lib/fpn/nms' Makefile:10: recipe for target 'nms' failed make: *** [nms] Error 2

Please help me!!! Thanks

parseh123 avatar Jul 27 '19 16:07 parseh123

sorry I'm not sure how to use google colab. My guess is that you have a newer version of pytorch than what I used, so you would need to find a way to use the version that I used for this project.

rowanz avatar Jul 30 '19 13:07 rowanz

Thanks. Is it possible to run this code in windows?

parseh123 avatar Jul 31 '19 08:07 parseh123

I recommend running the code in Linux

jungjun9150 avatar Aug 01 '19 00:08 jungjun9150

Hi, I met the same problem. Have you solved?

LifangD avatar Feb 28 '20 10:02 LifangD

    I haved solved the problem.
     First of all,  I have three versions of CUDA in /usr/local, which are 10.0,9.0, and 8.0.The default CUDA is 10.0, that is, there is a soft link from /usr/local/cuda to /usr/local/cuda-10.0
     To compile successfully, I create a new virtual environment in Anaconda.The following figure shows the installation of the virtual environment:

image So far, some error messages still appear when I execute the make command. Until I took a closer look at all the Makefile files and some of the build.py files involved, I found some code in the files: "/usr/local/cuda /bin/nvcc -c -o ......",you can use grep -rn "cuda/bin" to locate these files.I just knew that I compiled with my default CUDA, which is CUDA10.0. In all places with Makefile files, I use "make clean" to clean the generated files, and then change "/usr/local/cuda/bin" to "/usr/local/cuda-9.0/bin/nvcc" to compile successfully.

zhangchenghua123 avatar Aug 12 '20 14:08 zhangchenghua123