question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: dist must be a Distribution instance

See original GitHub issue

When I run sh make.sh, then the following comes up, how can I overcome this problem? and my environment:

  • Ubuntu18.04
  • Python3.7(Anoconda)
  • Pytorch1.0.1 Help!!!

running build_ext skipping 'model/utils/bbox.c' Cython extension (up-to-date) skipping 'pycocotools/_mask.c' Cython extension (up-to-date) Compiling nms kernels by nvcc... Including CUDA code. /home/renb/project/faster-rcnn.pytorch/lib/model/nms ['/home/renb/project/faster-rcnn.pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o'] Traceback (most recent call last): File "build.py", line 35, in <module> extra_objects=extra_objects File "/home/renb/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 228, in __init__ super(BuildExtension, self).__init__(*args, **kwargs) File "/home/renb/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 163, in __init__ _Command.__init__(self, dist) File "/home/renb/anaconda3/lib/python3.7/distutils/cmd.py", line 57, in __init__ raise TypeError("dist must be a Distribution instance") TypeError: dist must be a Distribution instance Compiling roi pooling kernels by nvcc... /home/renb/project/faster-rcnn.pytorch/lib/model/roi_pooling Including CUDA code. Traceback (most recent call last): File "build.py", line 32, in <module> extra_objects=extra_objects File "/home/renb/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 228, in __init__ super(BuildExtension, self).__init__(*args, **kwargs) File "/home/renb/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 163, in __init__ _Command.__init__(self, dist) File "/home/renb/anaconda3/lib/python3.7/distutils/cmd.py", line 57, in __init__ raise TypeError("dist must be a Distribution instance") TypeError: dist must be a Distribution instance Compiling roi align kernels by nvcc... /home/renb/project/faster-rcnn.pytorch/lib/model/roi_align Including CUDA code. Traceback (most recent call last): File "build.py", line 35, in <module> extra_objects=extra_objects File "/home/renb/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 228, in __init__ super(BuildExtension, self).__init__(*args, **kwargs) File "/home/renb/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 163, in __init__ _Command.__init__(self, dist) File "/home/renb/anaconda3/lib/python3.7/distutils/cmd.py", line 57, in __init__ raise TypeError("dist must be a Distribution instance") TypeError: dist must be a Distribution instance Compiling roi crop kernels by nvcc... Including CUDA code. /home/renb/project/faster-rcnn.pytorch/lib/model/roi_crop Traceback (most recent call last): File "build.py", line 32, in <module> extra_objects=extra_objects File "/home/renb/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 228, in __init__ super(BuildExtension, self).__init__(*args, **kwargs) File "/home/renb/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 163, in __init__ _Command.__init__(self, dist) File "/home/renb/anaconda3/lib/python3.7/distutils/cmd.py", line 57, in __init__ raise TypeError("dist must be a Distribution instance") TypeError: dist must be a Distribution instance

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
AlexanderHustinxcommented, May 8, 2019

Which CUDA and GCC version do you use?

EDIT: If you’re using pytorch-1.0 you should use the pytorch-1.0 branch as well (git checkout pytorch-1.0) and follow the instructions on that branch (https://github.com/jwyang/faster-rcnn.pytorch/tree/pytorch-1.0)

So you should run: python setup.py build develop and not: sh make.sh

1reaction
dongzhi0312commented, May 8, 2019

yes,I clone the faster-rcnn.pytorch-1.0 and run python step.py build develop, and follow the 1.0 instruction

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: dist must be a Distribution instance - Stack Overflow
This error has to do with a discrepancy between the versions of distutils and setuptools installed on your machine.
Read more >
raise TypeError, "dist must be a Distribution instance"
Hi all, I suddenly experience difficulties using Cython (ver. 0.21.1 on Arch Linux, Python 2.7.9) by the simple import pyximport; pyximport.install()
Read more >
Cpp_extension TypeError:dist must be a Distribution instance
Import Error: torchutils.ffi is deprecated. Please use cpp extensions instread. So, I make it import os import torch from torch.utils.ffi import ...
Read more >
"dist must be a Distribution instance" check fails with setuptools
distutils uses this code to validate the input in "Command. ... Distribution): raise TypeError, "dist must be a Distribution instance" ...
Read more >
distutils.dist.Distribution - Epydoc
However, it is conceivable that a setup script might wish to subclass ... Construct a new Distribution instance: initialize all the attributes of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found