Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1584

Python • setup.py fails with Typeerror

$
0
0
I attempted to install a python package from PyPi manually. The package is not available via apt.
> sudo pip install vl53l1x
...
Because this is not available via apt, I have to override the catch-all pointing to apt.

Code:

> sudo pip install vl53l1x --break-system-packagesWARNING: Skipping /usr/local/lib/python3.11/dist-packages/gpiod-2.3.0-py3.11-linux-aarch64.egg/EGG-INFO due to invalid metadata entry 'name'WARNING: Skipping /usr/local/lib/python3.11/dist-packages/gpiod-2.3.0-py3.11-linux-aarch64.egg/EGG-INFO due to invalid metadata entry 'name'Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simpleCollecting vl53l1x  Using cached VL53L1X-0.0.5.tar.gz (182 kB)  Preparing metadata (setup.py) ... error  error: subprocess-exited-with-error    × python setup.py egg_info did not run successfully.  │ exit code: 1  ╰─> [40 lines of output]      Traceback (most recent call last):        File "<string>", line 2, in <module>        File "<pip-setuptools-caller>", line 34, in <module>        File "/tmp/pip-install-9y5nkm30/vl53l1x_9f59b1908ce74f819550680fb67aa103/setup.py", line 24, in <module>          setup(name='VL53L1X',        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup          _install_setup_requires(attrs)        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 75, in _install_setup_requires          dist = MinimalDistribution(attrs)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 57, in __init__          super().__init__(filtered)        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 473, in __init__          for ep in metadata.entry_points(group='distutils.setup_keywords'):                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 1040, in entry_points          return SelectableGroups.load(eps).select(**params)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 476, in load          ordered = sorted(eps, key=by_group)                    ^^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 1037, in <genexpr>          eps = itertools.chain.from_iterable(                                             ^        File "/usr/lib/python3.11/importlib/metadata/_itertools.py", line 16, in unique_everseen          k = key(element)              ^^^^^^^^^^^^        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 954, in _normalized_name          or super()._normalized_name             ^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 627, in _normalized_name          return Prepared.normalize(self.name)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 882, in normalize          return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^        File "/usr/lib/python3.11/re/__init__.py", line 185, in sub          return _compile(pattern, flags).sub(repl, string, count)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      TypeError: expected string or bytes-like object, got 'NoneType'      [end of output]    note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failed× Encountered error while generating package metadata.╰─> See above for output.note: This is an issue with the package mentioned above, not pip.hint: See above for details.
Is the setuptools method broken? Is this just my system?

Code:

> pythonPython 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linux>>> import setuptools>>> setuptools.__version__'66.1.1'

Statistics: Posted by tomdean — Wed Jun 11, 2025 9:47 pm



Viewing all articles
Browse latest Browse all 1584

Trending Articles