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.

Setuptools bootstrap fails in presence of installed setuptools_scm

See original GitHub issue
a@a:~$ sudo pip3 uninstall -y setuptools_scm 2> /dev/null 1> /dev/null
a@a:~$ git clone --depth=1 https://github.com/pypa/setuptools 2>/dev/null
a@a:~$ cd setuptools/
a@a:~/setuptools$ python3 ./bootstrap.py 2> /dev/null 1> /dev/null
a@a:~/setuptools$ python3 ./setup.py bdist_wheel 2> /dev/null 1> /dev/null
a@a:~/setuptools$ sudo pip3 install --upgrade ./dist/*.whl
Processing ./dist/setuptools-50.3.2.post20201124-py3-none-any.whl
a@a:~/setuptools$ git clone --depth=1 https://github.com/pypa/setuptools_scm 2>/dev/null
a@a:~/setuptools$ cd setuptools_scm/
a@a:~/setuptools/setuptools_scm$ python3 ./setup.py bdist_wheel 2> /dev/null 1> /dev/null
a@a:~/setuptools/setuptools_scm$ sudo pip3 install --upgrade ./dist/*.whl 2> /dev/null 1> /dev/null
a@a:~/setuptools/setuptools_scm$ cd ..
a@a:~/setuptools$ rm -rf ./setuptools.egg-info/
a@a:~/setuptools$ python3 ./bootstrap.py
adding minimal entry_points
Regenerating egg_info
Traceback (most recent call last):
  File "/home/a/setuptools/pkg_resources/__init__.py", line 2676, in version
    return self._version
  File "/home/a/setuptools/pkg_resources/__init__.py", line 2810, in __getattr__
    raise AttributeError(attr)
AttributeError: _version
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "setup.py", line 196, in <module>
    dist = setuptools.setup(**setup_params)
  File "/home/a/setuptools/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/a/setuptools/setuptools/dist.py", line 423, in __init__
    _Distribution.__init__(self, {
  File "/usr/lib/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/home/a/setuptools/setuptools/dist.py", line 694, in finalize_options
    for ep in sorted(eps, key=by_order):
  File "/home/a/setuptools/setuptools/dist.py", line 693, in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
  File "/home/a/setuptools/pkg_resources/__init__.py", line 2446, in load
    self.require(*args, **kwargs)
  File "/home/a/setuptools/pkg_resources/__init__.py", line 2469, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/home/a/setuptools/pkg_resources/__init__.py", line 753, in resolve
    if dist is None or (dist not in req and replace_conflicting):
  File "/home/a/setuptools/pkg_resources/__init__.py", line 3120, in __contains__
    item = item.version
  File "/home/a/setuptools/pkg_resources/__init__.py", line 2684, in version
    raise ValueError(msg, self) from e
ValueError: ("Missing 'Version:' header and/or PKG-INFO file at path: /home/a/setuptools/setuptools.egg-info/PKG-INFO", setuptools [unknown version] (/home/a/setuptools))
Traceback (most recent call last):
  File "./bootstrap.py", line 57, in <module>
    __name__ == '__main__' and ensure_egg_info()
  File "./bootstrap.py", line 38, in ensure_egg_info
    run_egg_info()
  File "./bootstrap.py", line 54, in run_egg_info
    subprocess.check_call(cmd)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'setup.py', 'egg_info']' returned non-zero exit status 1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jaracocommented, Mar 5, 2021

That’s great news. I’ll close this issue, but happy to re-open if there are lingering issues.

0reactions
lazkacommented, Mar 5, 2021

Normal setup.py install seems to work fine now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Full Text Bug Listing - Red Hat Bugzilla
0" Collecting setuptools_scm==6.2.0 The best candidate for 'setuptools-scm' has been yanked! The reason is 'regression due to a discovered setuptools bug'. The ...
Read more >
History - setuptools 65.6.3.post20221216 documentation
Previously this fixture was copying all the files and folders under the project root, including the .git directory, which is error prone and...
Read more >
python-xyz.scm - Ricardo Wurmus
... (delay python2-pytest-bootstrap)) ("python-setuptools-scm" (delay ... #:phases (modify-phases %standard-phases (add-after 'install 'install-doc (lambda* ...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... "dev-scheme/scm fails test" status:RESOLVED resolution:OBSOLETE severity: ... Bug:438796 - "dev-python/setuptools-0.6.28 fails to install with line ...
Read more >
CHANGES.rst - platform/external/python/setuptools - Google Git
dependencies if not present (a bootstrapping problem). As a result, Setuptools no longer supports self upgrade or. installation in the general case.
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