python3-light: cannot import importlib.metadata
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @jefferyto
Environment: x86 / 22.03, x86 / master
Description: python3-light installs importlib.metadata package, that can't be imported
$ docker run --rm -it openwrtorg/rootfs:x86-64
[...]
root@container:/# opkg update
root@container:/# opkg install python3-light
root@container:/# ls /usr/lib/python3.10/importlib/metadata/
__init__.pyc _adapters.pyc _collections.pyc _functools.pyc _itertools.pyc _meta.pyc _text.pyc
root@container:/# python3 -c "import importlib.metadata"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 6, in <module>
ModuleNotFoundError: No module named 'email'
discovered by : https://github.com/openwrt/packages/issues/20441
It seems it requires at least python3-email and python3-urllib
root@container:/# opkg install python3-email
Installing python3-email (3.10.7-3) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/python3-email_3.10.7-3_x86_64.ipk
Configuring python3-email.
root@container:/# python3 -c "import importlib.metadata"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 7, in <module>
File "/usr/lib/python3.10/pathlib.py", line 14, in <module>
ModuleNotFoundError: No module named 'urllib'
root@container:/# opkg install python3-urllib
Installing python3-urllib (3.10.7-3) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/python3-urllib_3.10.7-3_x86_64.ipk
Configuring python3-urllib.
root@container:/# python3 -c "import importlib.metadata"
root@container:/#
Also found https://github.com/openwrt/packages/issues/12942 by looking around in the issue tracker
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the python3-light package definition and inspect how its runtime dependencies are declared. Reproduce the issue with python3 -c "import importlib.metadata" in the shown OpenWrt image, then verify the import succeeds after installing the package with its required dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100