Mmdetection: AttributeError: install_layout

Created on 18 Nov 2019  路  8Comments  路  Source: open-mmlab/mmdetection

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
I follow the step in the INSTALL.md, after I type 'python setup.py develop' in the terminal, the terminal show the error.

Reproduction

  1. What command or script did you run?
python setup.py develop
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
    No
  2. What dataset did you use?
    default
    Environment

    • OS: Ubuntu 16

    • GCC 5.4.0

    • PyTorch version 1.2.0

  3. How you installed PyTorch conda
  4. GPU model M5000
  5. CUDA and CUDNN version CUDA 10 CUDNN 7.6.4

Error traceback
If applicable, paste the error trackback here.

(ylb) scut@scut-PC:~/mmskeleton$ python setup.py develop
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 353, in fetch_build_egg
cmd = self._egg_fetcher
AttributeError: 'Distribution' object has no attribute '_egg_fetcher'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 174, in
zip_safe=False)
File "/home/scut/miniconda3/envs/ylb/lib/python3.7/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 269, in init
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1104, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 378, in fetch_build_egg
cmd.ensure_finalized()
File "/home/scut/miniconda3/envs/ylb/lib/python3.7/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 289, in finalize_options
'install_lib', ('install_dir', 'install_dir')
File "/home/scut/miniconda3/envs/ylb/lib/python3.7/distutils/cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "/home/scut/miniconda3/envs/ylb/lib/python3.7/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options
self.set_undefined_options('install',('install_layout','install_layout'))
File "/home/scut/miniconda3/envs/ylb/lib/python3.7/distutils/cmd.py", line 290, in set_undefined_options
setattr(self, dst_option, getattr(src_cmd_obj, src_option))
File "/home/scut/miniconda3/envs/ylb/lib/python3.7/distutils/cmd.py", line 103, in getattr
raise AttributeError(attr)
AttributeError: install_layout

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

Most helpful comment

This seems to be a bug caused by setuptools, you can try to reinstall it. https://github.com/pypa/setuptools/issues/1086

All 8 comments

This seems to be a bug caused by setuptools, you can try to reinstall it. https://github.com/pypa/setuptools/issues/1086

Btw, why you report the bug to mmdetection when you seem to be installing mmskeleton?

This seems to be a bug caused by setuptools, you can try to reinstall it. pypa/setuptools#1086

OK锛孖鈥檒l try

Btw, why you report the bug to mmdetection when you seem to be installing mmskeleton?

The bug appeared when I install mmskeleton, so I try to install mmdetection first, then the bug appeared again.

So this should be the bug of the code environment rather than the codebase.

Btw, why you report the bug to mmdetection when you seem to be installing mmskeleton?

The bug appeared when I install mmskeleton, so I try to install mmdetection first, then the bug appeared again.

Hi there,
I recently encounter with the exact same error, which is AttributeError: install_layout when installing mmcv package.
I was just wondering how did you solve it? Looking forward to your early reply.
Thanks a lot!

Btw, why you report the bug to mmdetection when you seem to be installing mmskeleton?

The bug appeared when I install mmskeleton, so I try to install mmdetection first, then the bug appeared again.

Hi there,
I recently encounter with the exact same error, which is AttributeError: install_layout when installing mmcv package.
I was just wondering how did you solve it? Looking forward to your early reply.
Thanks a lot!

No锛孖 finally install mmedetection on another computer, and it worked. Maybe just like ZwwWayne said, this was caused by the bug of setuptools. I failed to install on the ubuntu with setuptools 20.7, and install on the ubuntu with setuptoolswith 40.8 successfully.

Btw, why you report the bug to mmdetection when you seem to be installing mmskeleton?

The bug appeared when I install mmskeleton, so I try to install mmdetection first, then the bug appeared again.

Hi there,
I recently encounter with the exact same error, which is AttributeError: install_layout when installing mmcv package.
I was just wondering how did you solve it? Looking forward to your early reply.
Thanks a lot!

No锛孖 finally install mmedetection on another computer, and it worked. Maybe just like ZwwWayne said, this was caused by the bug of setuptools. I failed to install on the ubuntu with setuptools 20.7, and install on the ubuntu with setuptoolswith 40.8 successfully.

Yeah I also worked it out recently on another server. Thanks so much for your reply.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fatLime picture fatLime  路  3Comments

yangcong955 picture yangcong955  路  3Comments

BeBeauty picture BeBeauty  路  3Comments

letanloc1998 picture letanloc1998  路  3Comments

namheegordonkim picture namheegordonkim  路  3Comments