-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
pdm install error (regarding to resolvelib) #685
Comments
I found something similar at https://aur.archlinux.org/packages/python-pdm/#comment-810500 |
Somehow this worked:
Tried here, nothing worked.
Tried here - Meanwhile content of
|
Try to upgrade the version of |
I don't know how the distro works but pdm pinned |
@frostming yes, but for example controlling a led strip requires sudo, and so pdm should be in that environment or I will need to dance around with sudo / PATH / etc. It seems to upgrade pip and wheels helped in this case. |
Why is this closed? Is there a fix? |
@henri-hulski you should never mess with the system dependencies, but instead, install PDM in an isolated env. Look at the installation guide, we never recommend installing PDM into the global site-packages. Plus, it is unfair to ask for every package that has conflicts with pip's dependencies to bundle all deps with it, that is not how Python packaging works. |
@frostming I didn't. Actually I followed exactly the instructions and used the So it seems that the installer does't create actually a totally isolated env. |
My environment: $ pdm info && pdm info --env
PDM version: 1.10.0
Python Interpreter: /usr/bin/python3 (3.9)
Project Root: ~/web/myproject/myproject-server
Project Packages: ~/web/myproject/myproject-server/__pypackages__/3.9
{
"implementation_name": "cpython",
"implementation_version": "3.9.2",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_release": "5.14.0-0.bpo.2-amd64",
"platform_system": "Linux",
"platform_version": "#1 SMP Debian 5.14.9-2~bpo11+1 (2021-10-10)",
"python_full_version": "3.9.2",
"platform_python_implementation": "CPython",
"python_version": "3.9",
"sys_platform": "linux"
} So the Python interpreter in use is the global one: |
no, |
Aa ok. is there a way to check which environment |
|
This is my error, when trying to make an install: $ pdm install --prod -vvv
Lock file does not exist or is incompatible, trying to generate one...
======== Start resolving requirements ========
pytest-cov
coverage[toml]
more.cerberus
more.jwtauth
more.pony
more.emit
more.cors
argon2-cffi
gunicorn
itsdangerous
yagmail[all]
keyrings.alt
email-validator
psycopg2
pyyaml
flake8
black
pytest>=2.9.1
pytest-env
pytest-localserver
WebTest>=2.0.14
python>=3.9
Adding requirement pytest-cov
Traceback (most recent call last):
File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 171, in _merge_into_criterion
KeyError: 'pytest-cov'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/.local/bin/pdm", line 8, in <module>
sys.exit(main())
File "~/.local/share/pdm/venv/lib/python3.9/site-packages/pdm/core.py", line 200, in main
return Core().main(args)
File "~/.local/share/pdm/venv/lib/python3.9/site-packages/pdm/core.py", line 153, in main
raise cast(Exception, err).with_traceback(traceback)
File "~.local/share/pdm/venv/lib/python3.9/site-packages/pdm/core.py", line 148, in main
f(options.project, options)
File "~/.local/share/pdm/venv/lib/python3.9/site-packages/pdm/cli/commands/install.py", line 39, in handle
actions.do_lock(project, strategy="all", dry_run=options.dry_run)
File "~/.local/share/pdm/venv/lib/python3.9/site-packages/pdm/cli/actions.py", line 68, in do_lock
mapping, dependencies = resolve(
File "~/.local/share/pdm/venv/lib/python3.9/site-packages/pdm/resolver/core.py", line 31, in resolve
result = resolver.resolve(requirements, max_rounds)
File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 453, in resolve
File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 318, in resolve
File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 173, in _merge_into_criterion
File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 79, in from_requirement
TypeError: find_matches() missing 2 required positional arguments: 'requirements' and 'incompatibilities' So it seems that |
So it seems that the Problem comes from the import of if TYPE_CHECKING:
from resolvelib.resolvers import Resolver |
It turns out the redistributed As a workaround, you can re-install the ~/.local/share/pdm/venv/bin/pip install -I pip |
Thank you very much. The proposed workaround (re-install the pip in the venv) has just helped me in the same situation, as described. |
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
Actual behavior
Expected behavior
Packages installed successfully
Environment Information
This is a new raspbian/buster installation with upgrading to raspbian/bullseye and installation of:
The text was updated successfully, but these errors were encountered: