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

I get "ResolutionImpossible" error when running "pdm install" on PDM's own project #2146

Closed
1 task done
quag-cactus opened this issue Jul 30, 2023 · 1 comment · Fixed by j178/pdm#1
Closed
1 task done
Labels
🐛 bug Something isn't working

Comments

@quag-cactus
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

I created a virtual environment according to "Local Development" section of the CONTRIBUTING.md and ran pdm install.

Actual behavior

ResolutionImpossible error occurred and installation of the dependent package failed.

This error appears to be caused by a restriction on the pip resolver requires-python.

This error seems odd, considering that CI cycles for this repository are routinely successful. However, it may be noted that I am using amazon linux 2 based on centOS 7 for development.

$ pdm install
Inside an active virtualenv /home/ec2-user/environment/pdm/.venv, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
See /tmp/pdm-install-resolve-kbaullbh.log for detailed debug log.
[ResolutionImpossible]: [RequirementInformation(requirement=PythonRequirement(name='python', marker=None, extras=None, specifier=<PySpecSet >=3.7>, editable=False, prerelease=False), 
parent=None), RequirementInformation(requirement=PythonRequirement(name='python', marker=None, extras=None, specifier=<PySpecSet >=3.10>, editable=False, prerelease=False), 
parent=<Candidate [email protected].0>)]
Add '-v' to see the detailed traceback
verbose messages
$ pdm install -v
Inside an active virtualenv /home/ec2-user/environment/pdm/.venv, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
STATUS: Resolving packages from lockfile...
unearth.preparer: The file . is a local directory, use it directly
pdm.termui: Running PEP 517 backend to get metadata for <Link file:///home/ec2-user/environment/pdm (from None)>
pdm.termui: Preparing isolated env for PEP 517 build...
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   pdm-backend
pdm.termui:   python>=3.11.4,<3.11.5
pdm.termui:   Adding requirement pdm-backend
pdm.termui:   Adding requirement python>=3.11.4,<3.11.5
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui: Pinning: pdm-backend 2.1.4
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui:        python None
pdm.termui:   pdm-backend 2.1.4
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/16/89/09d2549037cb369a6803536f86e471ce52b004ef160a03a9ce92cbad9dcd/pdm_backend-2.1.4-py3-none-any.whl (from https://pypi.org/simple/pdm-backend/)>
pdm.termui: Synchronization complete.
unearth.preparer: The file . is a local directory, use it directly
pdm.termui: Running PEP 517 backend to get metadata for <Link file:///home/ec2-user/environment/pdm (from None)>
pdm.termui: Preparing isolated env for PEP 517 build...
unearth.preparer: The file . is a local directory, use it directly
pdm.termui: Running PEP 517 backend to get metadata for <Link file:///home/ec2-user/environment/pdm (from None)>
pdm.termui: Preparing isolated env for PEP 517 build...
unearth.preparer: The file . is a local directory, use it directly
pdm.termui: Running PEP 517 backend to get metadata for <Link file:///home/ec2-user/environment/pdm (from None)>
pdm.termui: Preparing isolated env for PEP 517 build...
Traceback (most recent call last):
  File "/home/ec2-user/environment/pdm/.venv/bin/pdm", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ec2-user/environment/pdm/src/pdm/core.py", line 290, in main
    return Core().main(args or sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ec2-user/environment/pdm/src/pdm/core.py", line 208, in main
    raise cast(Exception, err).with_traceback(traceback) from None
  File "/home/ec2-user/environment/pdm/src/pdm/core.py", line 203, in main
    self.handle(project, options)
  File "/home/ec2-user/environment/pdm/src/pdm/core.py", line 157, in handle
    command.handle(project, options)
  File "/home/ec2-user/environment/pdm/src/pdm/cli/commands/install.py", line 95, in handle
    actions.do_sync(
  File "/home/ec2-user/environment/pdm/src/pdm/cli/actions.py", line 197, in do_sync
    candidates = resolve_candidates_from_lockfile(project, requirements)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ec2-user/environment/pdm/src/pdm/cli/actions.py", line 140, in resolve_candidates_from_lockfile
    mapping, *_ = resolve(
                  ^^^^^^^^
  File "/home/ec2-user/environment/pdm/src/pdm/resolver/core.py", line 36, in resolve
    result = resolver.resolve(requirements, max_rounds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ec2-user/environment/pdm/.venv/lib/python3.11/site-packages/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ec2-user/environment/pdm/.venv/lib/python3.11/site-packages/resolvelib/resolvers.py", line 434, in resolve
    success = self._backjump(causes)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ec2-user/environment/pdm/.venv/lib/python3.11/site-packages/resolvelib/resolvers.py", line 318, in _backjump
    raise ResolutionImpossible(causes)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=PythonRequirement(name='python', marker=None, extras=None, specifier=<PySpecSet >=3.7>, editable=False, prerelease=False), parent=None), RequirementInformation(requirement=PythonRequirement(name='python', marker=None, extras=None, specifier=<PySpecSet >=3.10>, editable=False, prerelease=False), parent=<Candidate [email protected]>)]

Expected behavior

Package installation completes successfully

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
Inside an active virtualenv /home/ec2-user/environment/pdm/.venv, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
PDM version:
  0.1.dev2390+gec4525b.editable
Python Interpreter:
  /home/ec2-user/environment/pdm/.venv/bin/python (3.11)
Project Root:
  /home/ec2-user/environment/pdm
Local Packages:
  

PDM 0.1.dev2390+gec4525b.editable is installed, while 2.8.1 is available.
Please run `pdm self update` to upgrade.
Run `pdm config check_update false` to disable the check.
Inside an active virtualenv /home/ec2-user/environment/pdm/.venv, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.4",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "4.14.320-242.534.amzn2.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Wed Jul 12 19:43:51 UTC 2023",
  "python_full_version": "3.11.4",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "linux"
}

PDM 0.1.dev2390+gec4525b.editable is installed, while 2.8.1 is available.
Please run `pdm self update` to upgrade.
Run `pdm config check_update false` to disable the check.
@quag-cactus quag-cactus added the 🐛 bug Something isn't working label Jul 30, 2023
@quag-cactus
Copy link
Author

Thank you for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant