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

"WARNING: Error parsing dependencies of console" on m1 mac after update to pip 24.1.1 #12824

Closed
1 task done
arkarkark opened this issue Jul 4, 2024 · 4 comments
Closed
1 task done
Labels
type: support User Support

Comments

@arkarkark
Copy link

Description

when I update pip to 24.1.1 I get this error message every time pip runs

pip check
WARNING: Error parsing dependencies of console: Invalid version: 'Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000'

this is on my m1 mac (OSX Sonoma 14.5 (23F79))

here's some possibly useful output

#pip check
No broken requirements found.
#pip --version
pip 24.0 from /opt/homebrew/lib/python3.12/site-packages/pip (python 3.12)
#python3 --version
Python 3.12.4
#python3.12 -m pip install --upgrade pip
Requirement already satisfied: pip in /opt/homebrew/lib/python3.12/site-packages (24.0)
Collecting pip
  Using cached pip-24.1.1-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.1.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-24.1.1
#pip check
WARNING: Error parsing dependencies of console: Invalid version: 'Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000'
#uname -a
Darwin m1.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64

brew reinstall python fixed the problem as long as I don't update pip

Expected behavior

pip check should just say everything is o.k. with no warnings

pip version

24.1.1

Python version

3.12.14

OS

OSX Sonoma 14.5 (23F79)

How to Reproduce

  1. brew install python
  2. pip check
  3. python3.12 -m pip install --upgrade pip
  4. pip check

Output

WARNING: Error parsing dependencies of console: Invalid version: 'Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000'

Code of Conduct

@arkarkark arkarkark added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 4, 2024
@ichard26 ichard26 added type: support User Support and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Jul 4, 2024
@ichard26
Copy link
Member

ichard26 commented Jul 4, 2024

The warning is legitimate (note that warnings are not errors!). The latest feature release of pip, aka pip 24.1, removed support for legacy versions and legacy specifiers. This extends to environment markers. I'm not really sure where console's invalid dependency requirements are coming from unfortunately (as the latest version of console doesn't seem to use any legacy requirements).

Anyway, whatever version of console you're using right now, you won't be able to reinstall it using pip 24.1.

It is known that enforcing PEP 440 syntax for system environment markers is not really workable, but that's already tracked in other issues (I don't have a link to them at hand, sorry).

@mixmastamyk
Copy link

Believe the error it's coming from this in setup.py:

install_requires = (
    'colorama;            os_name == "nt" and platform_version < "10.0.10586" ',
)
  1. I checked on Win/Lin/Mac and only on Windows does platform.version() return a version-like string. I think that's the root issue. A broken or at least inconsistent platform.version() result. Other available environment selectors are not sufficient to do this job.

(The job being to install colorama if using an older Windows 10 that doesn't support ANSI escape chars.)

  1. This environment selector selects os_name == "nt" first, so on non-NT environments it should finish there and not go on. This is standard boolean logic, if it needs to run both tests when not necessary that's another bug/enhancement to be done.

  2. Your pip/setuptools version parser can't handle real world output from platform.version. Setuptools shouldn't be strict here until platform or selectors can be fixed/redesigned.

@ichard26
Copy link
Member

ichard26 commented Jul 8, 2024

@mixmastamyk Marker evaluation is implemented by the pypa/packaging project which pip vendors. I've filed a PR to fix this issue as this is actually a violation of the specification: pypa/packaging#816.

I didn't realize this until after the fact so that's why this context was missing in my original response here. Sorry for making you do redundant work!

@mixmastamyk
Copy link

That's all right... helped me understand the situation.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: support User Support
Projects
None yet
Development

No branches or pull requests

3 participants