zeromq / pyzmq

PyZMQ: Python bindings for zeromq
http://zguide.zeromq.org/py:all
BSD 3-Clause "New" or "Revised" License
3.72k stars 636 forks source link

pyproject.toml not parseable by pip 18.1 (debian 10) #1807

Closed kenxausten closed 1 year ago

kenxausten commented 1 year ago

Please use this template for reporting suspected bugs or requests for help.

Issue description

failed to install pyzmq

Environment

Minimal test code / Steps to reproduce the issue

  1. pip3 install pyzmq

What's the actual result? (include assertion message & call stack if applicable)

failed to install zmq root@RK3568:/home/admin# pip3 install pyzmq Collecting pyzmq Using cached https://files.pythonhosted.org/packages/46/0d/b06cf99a64d4187632f4ac9ddf6be99cd35de06fe72d75140496a8e0eef5/pyzmq-24.0.1.tar.gz Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main status = self.run(options, args) File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 338, in run resolver.resolve(requirement_set) File "/usr/lib/python3/dist-packages/pip/_internal/resolve.py", line 102, in resolve self._resolve_one(requirement_set, req) File "/usr/lib/python3/dist-packages/pip/_internal/resolve.py", line 256, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/lib/python3/dist-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for self.require_hashes File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement abstract_dist.prep_for_dist(finder, self.build_isolation) File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 100, in prep_for_dist self.req.load_pyproject_toml() File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 428, in load_pyproject_toml str(self) File "/usr/lib/python3/dist-packages/pip/_internal/pyproject.py", line 43, in load_pyproject_toml pp_toml = pytoml.load(f) File "/usr/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 303, in load filename=fin.name) File "/usr/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 370, in loads toks.expect('=', 'expected_equals') File "/usr/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 250, in expect self.error(error_text) File "/usr/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 253, in error raise TomlError(message, self.pos[0][0], self.pos[0][1], self._filename) pytoml.core.TomlError: /tmp/pip-install-n2sovrrt/pyzmq/pyproject.toml(60, 12): expected_equals

What's the expected result?

should install success

minrk commented 1 year ago

I believe we have wheels for this Python, if you update your pip. 18.1 is very old.

It's always a good idea to do:

python3 -m pip install --upgrade pip

before you install anything with pip.

minrk commented 1 year ago

This Dockerfile builds on arm64 with debian 10:

FROM debian:10
RUN apt-get -y update \
 && apt-get -y dist-upgrade \
 && apt-get -y install python3 python3-pip
RUN python3 -m pip install --upgrade pip \
 && python3 -m pip install pyzmq

so the fix is indeed to keep your pip up-to-date. That said, #1817 also fixes the problem with very-old pip.