Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing from tarball fails #51

Closed
tacaswell opened this issue Sep 4, 2020 · 5 comments
Closed

Installing from tarball fails #51

tacaswell opened this issue Sep 4, 2020 · 5 comments
Labels
invalid This doesn't seem right

Comments

@tacaswell
Copy link
Contributor

Using a stock Python38 (system python from Arch Linux) doing pip install -v --no-binary :all: pyerfa fails with

  Given no hashes to check 0 links for project 'oldest-supported-numpy': discarding no candidates
  ERROR: Could not find a version that satisfies the requirement oldest-supported-numpy (from versions: none)
  ERROR: No matching distribution found for oldest-supported-numpy
  Exception information:
  Traceback (most recent call last):
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
      status = self.run(options, args)
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
      return func(self, options, args)
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 324, in run
      requirement_set = resolver.resolve(
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
      discovered_reqs.extend(self._resolve_one(requirement_set, req))
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
      abstract_dist = self._get_abstract_dist_for(req_to_install)
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 339, in _get_abstract_dist_for
      self._populate_link(req)
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 305, in _populate_link
      req.link = self._find_requirement_link(req)
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 270, in _find_requirement_link
      best_candidate = self.finder.find_requirement(req, upgrade)
    File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 926, in find_requirement
      raise DistributionNotFound(
  pip._internal.exceptions.DistributionNotFound: No matching distribution found for oldest-supported-numpy
  Removed build tracker: '/tmp/pip-req-tracker-34xcv9k5'
  Installing build dependencies ... error
Exception information:
Traceback (most recent call last):
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    status = self.run(options, args)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 324, in run
    requirement_set = resolver.resolve(
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
    abstract_dist = _get_prepared_distribution(
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 66, in _setup_isolation
    self.req.build_env.install_requirements(
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/build_env.py", line 205, in install_requirements
    call_subprocess(args, spinner=spinner)
  File "/home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /home/tcaswell/.virtualenvs/sys38/bin/python /home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-s0_eu0jn/overlay --no-warn-script-location -v --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=42' 'setuptools_scm[toml]>=3.4' wheel 'jinja2>=2.10.3' oldest-supported-numpy Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/tcaswell/.virtualenvs/sys38/bin/python /home/tcaswell/.virtualenvs/sys38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-s0_eu0jn/overlay --no-warn-script-location -v --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=42' 'setuptools_scm[toml]>=3.4' wheel 'jinja2>=2.10.3' oldest-supported-numpy Check the logs for full command output.
Removed pyerfa from https://files.pythonhosted.org/packages/86/5d/f4cc5804744f7ab14b54059ebd44969e4f6af9eb6909f56d112bf9f0730b/pyerfa-1.7.0.tar.gz#sha256=58cd5fbc27e31211102568f952fdbac410b184563be4da57743cbe5e5ccebe47 from build tracker '/tmp/pip-req-tracker-34xcv9k5'
Removed build tracker: '/tmp/pip-req-tracker-34xcv9k5'

Doing

pip install -v --no-binary :all: pyerfa --no-build-isolation

instead installs without error.

@tacaswell
Copy link
Contributor Author

With

pip install -v --no-binary :all: pyerfa --no-build-isolation --use-feature=2020-resolver

I also get

Exception information:
Traceback (most recent call last):
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    status = self.run(options, args)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 324, in run
    requirement_set = resolver.resolve(
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 427, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 324, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 224, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 215, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate):
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 149, in get_dependencies
    return [
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 149, in <listcomp>
    return [
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 282, in iter_dependencies
    for r in self.dist.requires():
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 261, in dist
    self._fetch_metadata()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 255, in _fetch_metadata
    self._prepare()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 232, in _prepare
    self._check_metadata_consistency()
  File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 218, in _check_metadata_consistency
    raise MetadataInconsistent(self._ireq, "version", dist.version)
pip._internal.exceptions.MetadataInconsistent: Requested pyerfa from https://files.pythonhosted.org/packages/86/5d/f4cc5804744f7ab14b54059ebd44969e4f6af9eb6909f56d112bf9f0730b/pyerfa-1.7.0.tar.gz#sha256=58cd5fbc27e31211102568f952fdbac410b184563be4da57743cbe5e5ccebe47 has different version in metadata: '0.0.0'
ERROR: Requested pyerfa from https://files.pythonhosted.org/packages/86/5d/f4cc5804744f7ab14b54059ebd44969e4f6af9eb6909f56d112bf9f0730b/pyerfa-1.7.0.tar.gz#sha256=58cd5fbc27e31211102568f952fdbac410b184563be4da57743cbe5e5ccebe47 has different version in metadata: '0.0.0'
Removed build tracker: '/tmp/pip-req-tracker-1f1f3e2d'

but I can not reproduce this problem on a stable system environment...

@avalentino
Copy link
Member

Hi @tacaswell, sorry for the late reply.

I can confirm that I can reproduce the issue.

The problem seems to be related to the fact that "oldest_supported_numpy" only provides binary distributions (there is not source distribution for it on pypi as far as I can see).

In principle all project using "oldest_supported_numpy" in their "pyproject.toml" should suffer of the same issue. I have not verified. Do you have some pointer we can use as example?

Not sure which is the best approach to fix it.

@tacaswell
Copy link
Contributor Author

Ah, so if I had been less over-kill with my --no-binary usage I probably would have avoided at least the first error. I think we need to report this to the oldest_supported_numpy developers. Hopefully the fix is a simple as them putting up an sdist that has the same pins (I opened an issue upstream for that).

@tacaswell
Copy link
Contributor Author

With

pip install -v --no-binary pyerfa pyerfa  --use-feature=2020-resolver

I can install in a py38 env without error but have not been able to reproduce the version consistency error. I'm happy to close this as the numpy issue is out of your control and the second issue is not reproducible on a stable version (and I'm optimistic that if it is a real bug in pip / setuptools / wheel it will show up for me on other packages as well).

@avalentino
Copy link
Member

OK
Thank you @tacaswell for your investigation and for opening scipy/oldest-supported-numpy#7.

I'm closing this one for now since it seems there is nothing we can do in pyerfa.
Please fill free to reopen if you still have problems.

@avalentino avalentino added the invalid This doesn't seem right label Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants