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.

AttributeError: install_layout

See original GitHub issue

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
  • How you installed PyTorch conda
  • GPU model M5000
  • 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!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
ZwwWaynecommented, Nov 19, 2019

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

0reactions
EricleiKUANGcommented, Jan 8, 2020

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,I 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - AttributeError: install_layout when attempting to install ...
I have tried installing other packages (e.g. numpy ) with similar outcomes; the compilation finishes, but it blows up when it tries to...
Read more >
AttributeError: install_layout. Did you mean: 'install_platlib ...
I'm trying to install my local dev copy of tikzplotlib and it fails since pip 22. Not sure what's going wrong now. Full...
Read more >
Bug#1003252: AttributeError: install_layout - Google Groups
Since setuptools 60+ is out with SETUPTOOLS_USE_DISTUTILS defaulting to "local", pip install --editable in --system-site-packages venvs fails: $ docker run --rm ...
Read more >
Debian Bug report logs - #1003252 AttributeError: install_layout
Subject: AttributeError: install_layout ... The setuptools install-layout patch [2] omits the distutils bits.
Read more >
Attribute Error: install_layout - meejah.ca
Attribute Error : install_layout. November 25, 2015. With the “portable” build of PyPy 4.0.1 (and 2.6.1) installed on a Debian jessie system, I...
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