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

from wheel file install a package with local dependencies #7027

Closed
steven-bioinfo opened this issue Nov 14, 2022 · 2 comments
Closed

from wheel file install a package with local dependencies #7027

steven-bioinfo opened this issue Nov 14, 2022 · 2 comments
Labels
status/duplicate Duplicate issues

Comments

@steven-bioinfo
Copy link

Issue

Hello,

I want to install a wheel created be poetry with local dependencies.
I added local dependencies with : poetry add dist/libbioquery-0.1.0-py3-none-any.whl and poetry add dist/credential-0.1.0-py3-none-any.whl
After I build a wheel with : poetry build.
Next, i try to install this wheel with pip install dist/MiStudio-0.1.0-py3-none-any.whl but i have an error for the installation of local dependencies (same error with the other local packages :

Defaulting to user installation because normal site-packages is not writeable
Processing ./dist/MiStudio-0.1.0-py3-none-any.whl
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3101, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/packaging/requirements.py", line 117, in __init__
    raise InvalidRequirement(f"Invalid URL: {req.url}")
pip._vendor.packaging.requirements.InvalidRequirement: Invalid URL: dist/credential-0.1.0-py3-none-any.whl

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
    status = run_func(*args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 338, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 482, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 374, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 214, in _attempt_to_pin_criterion
    criteria = self._get_updated_criteria(candidate)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 204, in _get_updated_criteria
    for requirement in self._p.get_dependencies(candidate=candidate):
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 204, in get_dependencies
    return [r for r in candidate.iter_dependencies(with_requires) if r is not None]
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 204, in <listcomp>
    return [r for r in candidate.iter_dependencies(with_requires) if r is not None]
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 236, in iter_dependencies
    requires = self.dist.iter_dependencies() if with_requires else ()
  File "/usr/lib/python3.10/site-packages/pip/_internal/metadata/pkg_resources.py", line 91, in iter_dependencies
    return self._dist.requires(extras)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
    dm = self._dep_map
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3033, in _compute_dependencies
    reqs.extend(parse_requirements(req))
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3094, in parse_requirements
    yield Requirement(line)
  File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3103, in __init__
    raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Invalid URL: dist/credential-0.1.0-py3-none-any.whl

What is the solution to install the wheel created by poetry with local dependencies ?

Thanks for our help,

Steven

@steven-bioinfo steven-bioinfo added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 14, 2022
@dimbleby
Copy link
Contributor

duplicate #5273

@steven-bioinfo steven-bioinfo closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2022
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 14, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants