I need to list the installed libraries on Raspberry Pi5. I get the following error when I use pip list command.
user@raspberrypi:~ $ pip list
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 171, in run
packages: "_ProcessedDists" = [
^
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 171, in <listcomp>
packages: "_ProcessedDists" = [
^
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/base.py", line 664, in <genexpr>
return (d for d in it if d.canonical_name not in skip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
for dist in self._iter_distributions():
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_envs.py", line 175, in _iter_distributions
yield from finder.find(location)
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_envs.py", line 79, in find
for dist, info_location in self._find_impl(location):
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_envs.py", line 64, in _find_impl
raw_name = get_dist_name(dist)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_compat.py", line 52, in get_dist_name
name = cast(Any, dist).name
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 622, in name
return self.metadata['Name']
^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 611, in metadata
or self.read_text('PKG-INFO')
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 938, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/pathlib.py", line 1059, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/pathlib.py", line 1045, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 74] Bad message: '/usr/lib/python3/dist-packages/piexif-1.1.3.egg-info/PKG-INFO'
user@raspberrypi:~ $
Code:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 171, in run
packages: "_ProcessedDists" = [
^
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 171, in <listcomp>
packages: "_ProcessedDists" = [
^
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/base.py", line 664, in <genexpr>
return (d for d in it if d.canonical_name not in skip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
for dist in self._iter_distributions():
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_envs.py", line 175, in _iter_distributions
yield from finder.find(location)
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_envs.py", line 79, in find
for dist, info_location in self._find_impl(location):
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_envs.py", line 64, in _find_impl
raw_name = get_dist_name(dist)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pip/_internal/metadata/importlib/_compat.py", line 52, in get_dist_name
name = cast(Any, dist).name
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 622, in name
return self.metadata['Name']
^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 611, in metadata
or self.read_text('PKG-INFO')
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 938, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/pathlib.py", line 1059, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/pathlib.py", line 1045, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 74] Bad message: '/usr/lib/python3/dist-packages/piexif-1.1.3.egg-info/PKG-INFO'
user@raspberrypi:~ $
Statistics: Posted by Fwpriya — Tue Jun 18, 2024 5:09 am — Replies 0 — Views 20