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

ModuleNotFoundError: No module named 'torch.utils.cpp_extension' #102

Open
jxylon opened this issue Jan 14, 2021 · 2 comments
Open

ModuleNotFoundError: No module named 'torch.utils.cpp_extension' #102

jxylon opened this issue Jan 14, 2021 · 2 comments

Comments

@jxylon
Copy link

jxylon commented Jan 14, 2021

I follow your Setup, at compiling I recived followed error

cd lib/draw_rectangles; python setup.py build_ext --inplace
running build_ext
cd lib/fpn/box_intersections_cpu; python setup.py build_ext --inplace
running build_ext
cd lib/fpn/nms; make
make[1]: Entering directory '/home/lab421/cjx/neural-motifs/lib/fpn/nms'
python build.py
Traceback (most recent call last):
  File "build.py", line 4, in <module>
    from torch.utils.cpp_extension import BuildExtension
ModuleNotFoundError: No module named 'torch.utils.cpp_extension'
Makefile:2: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/lab421/cjx/neural-motifs/lib/fpn/nms'
Makefile:10: recipe for target 'nms' failed
make: *** [nms] Error 2

And it seems to upgrade pytorch to >=0.4, so I upgrade pytorch to 0.4, but I received followed error

cd lib/draw_rectangles; python setup.py build_ext --inplace
running build_ext
cd lib/fpn/box_intersections_cpu; python setup.py build_ext --inplace
running build_ext
cd lib/fpn/nms; make
make[1]: Entering directory '/home/lab421/cjx/neural-motifs/lib/fpn/nms'
python build.py
Including CUDA code.
/home/lab421/cjx/neural-motifs/lib/fpn/nms
Traceback (most recent call last):
  File "build.py", line 31, in <module>
    extra_objects=extra_objects
  File "/home/lab421/anaconda3/envs/neural-motifs/lib/python3.6/site-packages/setuptools/__init__.py", line 172, in __init__
    _Command.__init__(self, dist)
  File "/home/lab421/anaconda3/envs/neural-motifs/lib/python3.6/distutils/cmd.py", line 57, in __init__
    raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance

I google it, someone says I should downgrade pytorch to 0.3.
I really don't what should I do.

@HN123-123
Copy link

I also mat the same error, have you fit it ????

@jxylon
Copy link
Author

jxylon commented Apr 27, 2021

I also mat the same error, have you fit it ????

@HN123-123 sorry, I don't solve it

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

2 participants