AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
See original GitHub issueI’m trying to install project I’m working on using pip3 install -e "file:///home/vagrant/devel"
, but everytime I end up with:
$> pip3 install -e "file:///home/vagrant/devel"
Obtaining file:///home/vagrant/devel
Installing build dependencies ... done
Getting requirements to build wheel ... error
Complete output from command /home/vagrant/.virtualenvs/anitya/bin/python3 /home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp6db90a_q:
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 48, in get_requires_for_build_wheel
backend = _build_backend()
File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 39, in _build_backend
obj = getattr(obj, path_part)
AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
Maybe I’m just doing something wrong, but this worked few days ago.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Module 'setuptools.build_meta' has no attribute '__legacy__'
I am trying to install RASA on Ubuntu: It is erroring out with: Collecting SQLAlchemy<1.4.0,>=1.3.3 Using cached SQLAlchemy-1.3.15.tar.gz ...
Read more >ImportError: No module named 'setuptools.build_meta'
As ignorant as I am, I tried dropping this file into the site-packages\pip_vendor\pep517 directly with no change. I'm sure this is simple, but...
Read more >module 'setuptools.build_meta' has no attribute '__legacy__'
Bug 1679630 - AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'. Summary: AttributeError: module ...
Read more >Problem with python3-setuptools as a stage-package - snapcraft
The project I'm trying to snap up required python3-setuptools as a staging ... module 'setuptools.build_meta' has no attribute '__legacy__' ...
Read more >Bug #1840715 “AttributeError: module 'setuptools.build_meta ...
AttributeError : module 'setuptools.build_meta' has no attribute '__legacy__'. Bug #1840715 reported by Ryan Beisner on 2019-08-19.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As far as I know, this is triggered when all of the following conditions are met:
virtualenv
with--system-site-packages
pip >= 19.0.2
setuptools
is less than 40.8.0.build-backend="setuptools.build_meta"
in itspyproject.toml
.It is a bug in
pip
’s PEP 517 build isolation code: pypa/pip#6264.The best way to fix it at the moment is to explicitly specify
build-backend="setuptools.build_meta"
in yourpyproject.toml
, like this. Note that you’ll also want to putpyproject.toml
in yourMANIFEST.in
.Assuming you need
--system-site-packages
in your virtualenv, the second best way to solve this is to upgrade your system version ofsetuptools
.I’m going to close this issue as not a bug in
setuptools
, but thank you for the report. I recommend giving a +1 on thepip
thread, or chiming in there if you managed to trigger this in a different way.@Zlopez Oh, also
pip install -e --no-use-pep517 'file://whatever/vagrant/devel'
may work, not sure - I think it depends on whether the package in question was relying on the PEP 518 dependency satisfaction or not.