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.

Versioneer >=0.25 fails to install because it depends on itself

See original GitHub issue

Since 0.25, versioneer has itself as build-time dependency, which results in a failure when trying to install it via pip without using wheels:

$ ./venv/bin/pip install --no-binary :all: versioneer
Collecting versioneer
  Downloading versioneer-0.25.tar.gz (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.3/72.3 kB 1.7 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  Γ— pip subprocess to install build dependencies did not run successfully.
  β”‚ exit code: 2
  ╰─> [58 lines of output]
      Collecting setuptools
        Downloading setuptools-65.3.0.tar.gz (2.6 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 29.8 MB/s eta 0:00:00
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting versioneer>=0.24
        Using cached versioneer-0.25.tar.gz (72 kB)
      ERROR: Exception:
      Traceback (most recent call last):
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
          status = run_func(*args)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
          return func(self, options, args)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 369, in run
          requirement_set = resolver.resolve(
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
          result = self._result = resolver.resolve(
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
          if not criterion.candidates:
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
          return bool(self._sequence)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
          return any(self)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
          candidate = func()
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
          self._link_candidate_cache[link] = LinkCandidate(
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
          super().__init__(
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
          self.dist = self._prepare()
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
          dist = self._prepare_distribution()
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
          return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 438, in prepare_linked_requirement
          return self._prepare_linked_requirement(req, parallel_builds)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 524, in _prepare_linked_requirement
          dist = _get_prepared_distribution(
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 67, in _get_prepared_distribution
          with build_tracker.track(req):
        File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
          return next(self.gen)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/operations/build/build_tracker.py", line 122, in track
          self.add(req)
        File "/home/timo/venv/lib/python3.10/site-packages/pip/_internal/operations/build/build_tracker.py", line 92, in add
          raise LookupError(message)
      LookupError: https://files.pythonhosted.org/packages/4d/25/434d899300e8ffc6bce910185fc26fecd727839a4995bdb6ac7346481568/versioneer-0.25.tar.gz (from https://pypi.org/simple/versioneer/) (requires-python:>=3.7) is already being built: versioneer from https://files.pythonhosted.org/packages/4d/25/434d899300e8ffc6bce910185fc26fecd727839a4995bdb6ac7346481568/versioneer-0.25.tar.gz
      [end of output]

Not sure what the correct solution here is. I guess ideally a package shouldn’t depend on itself?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TimoRothcommented, Sep 6, 2022

Yep, works as expected again now, thanks!

0reactions
effigiescommented, Sep 6, 2022

@TimoRoth 0.26 has been pushed to pypi. Can you confirm that it works for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

versioneer - PyPI
Easy VCS-based management of project version strings.
Read more >
Python Versioneer is not generating a -version.py file
When I run versioneer install I receive an error stating it cannot find the _version.py file. Below is the copy of the file...
Read more >
scikit-build Documentation - Read the Docs
scikit-build is an improved build system generator for CPython C/C++/Fortran/Cython extensions. It provides better.
Read more >
versioneer module β€” PyGraphistry 0.11.6+0.gf0b15f1.dirty ...
The goal is to remove the tedious and error-prone β€œupdate the embedded version ... pip install versioneer to somewhere to your $PATH; add...
Read more >
subprocess-exited-with-erro | The search engine you control.
It seems the error comes from not being able to install wheel for lightfm. ... to install build dependencies Processing /data/projects/versioneer ERROR:Β ...
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