Skip to content

ERROR: Error while checking for conflicts. (python 3.13.1, pip 25.1.1) when a package with None version is installed. #13458

@ekkizogloy

Description

@ekkizogloy

Description

Pip seems to be crashing when checking for conflicts even when just running python -m pip install -U pip. It also happens when installing any other packages as well. I'm sure that this is due to some problematic packages installed, however this is the output of the debug messages. You will see the error at the end and there does not seem to be a useful message to help determine which packages are causing the error. The code should not crash.

Truncated output from pip list. You see a package with version None.

...
websocket-client                   1.8.0
websockets                         15.0.1
wheel                              0.45.1
wrapt                              1.17.2
yarl                               1.18.3
edge-clip-tools        None
(py313) PS C:\Work\src\zippin\zippin_python\fastauthz> python -m pip install --debug -U pip
Using pip 25.1.1 from C:\Work\venv\py313\Lib\site-packages\pip (python 3.13)
Non-user install because user site-packages disabled
Created temporary directory: C:\Users\lukee\AppData\Local\Temp\pip-build-tracker-71trphio
Initialized build tracking at C:\Users\lukee\AppData\Local\Temp\pip-build-tracker-71trphio
Created build tracker: C:\Users\lukee\AppData\Local\Temp\pip-build-tracker-71trphio
Entered build tracker: C:\Users\lukee\AppData\Local\Temp\pip-build-tracker-71trphio
Created temporary directory: C:\Users\lukee\AppData\Local\Temp\pip-install-enewzbuz
Created temporary directory: C:\Users\lukee\AppData\Local\Temp\pip-ephem-wheel-cache-xs7ulstu
Requirement already satisfied: pip in c:\work\venv\py313\lib\site-packages (25.1.1)
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple/
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
Fetched page https://pypi.org/simple/pip/ as application/vnd.pypi.simple.v1+json
  Found link https://files.pythonhosted.org/packages/3d/9d/1e313763bdfb6a48977b65829c6ce2a43eaae29ea2f907c8bbef024a7219/pip-0.2.tar.gz (from https://pypi.org/simple/pip/), version: 0.2
  Found link https://files.pythonhosted.org/packages/18/ad/c0fe6cdfe1643a19ef027c7168572dac6283b80a384ddf21b75b921877da/pip-0.2.1.tar.gz (from https://pypi.org/simple/pip/), version: 0.2.1
  Found link https://files.pythonhosted.org/packages/17/05/f66144ef69b436d07f8eeeb28b7f77137f80de4bf60349ec6f0f9509e801/pip-0.3.tar.gz (from https://pypi.org/simple/pip/), version: 0.3
  Found link https://files.pythonhosted.org/packages/0a/bb/d087c9a1415f8726e683791c0b2943c53f2b76e69f527f2e2b2e9f9e7b5c/pip-0.3.1.tar.gz (from https://pypi.org/simple/pip/), version: 0.3.1

.... (Truncated excess versions) ...

  Found link https://files.pythonhosted.org/packages/e0/f0/8a2806114cd36e282823fd4d8e88e3b94dc943c2569c350d0c826a49db38/pip-25.1-py3-none-any.whl (from https://pypi.org/simple/pip/) (requires-python:>=3.9), version: 25.1
  Found link https://files.pythonhosted.org/packages/79/67/c06f625e2968c417052b3a4a0eef40656d5d4d44033e57b40ec474af1d28/pip-25.1.tar.gz (from https://pypi.org/simple/pip/) (requires-python:>=3.9), version: 25.1
  Found link https://files.pythonhosted.org/packages/29/a2/d40fb2460e883eca5199c62cfc2463fd261f760556ae6290f88488c362c0/pip-25.1.1-py3-none-any.whl (from https://pypi.org/simple/pip/) (requires-python:>=3.9), version: 25.1.1
  Found link https://files.pythonhosted.org/packages/59/de/241caa0ca606f2ec5fe0c1f4261b0465df78d786a38da693864a116c37f4/pip-25.1.1.tar.gz (from https://pypi.org/simple/pip/) (requires-python:>=3.9), version: 25.1.1
Skipping link: not a file: https://pypi.org/simple/pip/
Given no hashes to check 255 links for project 'pip': discarding no candidates
Created temporary directory: C:\Users\lukee\AppData\Local\Temp\pip-unpack-yivzkh5a
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "C:\Work\venv\py313\Lib\site-packages\pip\_internal\commands\install.py", line 587, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "C:\Work\venv\py313\Lib\site-packages\pip\_internal\operations\check.py", line 116, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Work\venv\py313\Lib\site-packages\pip\_internal\operations\check.py", line 58, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dependencies)
                                       ^^^^^^^^^^^^
  File "C:\Work\venv\py313\Lib\site-packages\pip\_internal\metadata\importlib\_dists.py", line 175, in version
    return parse_version(self._dist.version)
  File "C:\Work\venv\py313\Lib\site-packages\pip\_vendor\packaging\version.py", line 56, in parse
    return Version(version)
  File "C:\Work\venv\py313\Lib\site-packages\pip\_vendor\packaging\version.py", line 200, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object, got 'NoneType'
Remote version of pip: 25.1.1
Local version of pip:  25.1.1
Was pip installed by pip? True
Removed build tracker: 'C:\\Users\\lukee\\AppData\\Local\\Temp\\pip-build-tracker-71trphio'

Expected behavior

The code should not crash. If the software is checking for conflicts and encounters an issue like this, it should output a useful messages for the user to correct the issue rather than crash.

pip version

25.1.1

Python version

3.13.1

OS

Windows 11 Home 24H2

How to Reproduce

  1. Create a custom package with version None.
  2. Install using pip install.
  3. Now any subsequent pip installs will crash pip.

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions