missing Python distribution metadata
Open
@asmorkalov is already working on this.
Since Jan 9, 2024.
bug
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Description
System Information
version: 4.8.0
Operating System: Guix System
Compiler: GCC 10.3.0
Detailed description
Python libraries/packages must come with a name-version.dist-info directory containing files such as METADATA [0], but this packages doesn't install any.
[0] https://packaging.python.org/en/latest/specifications/recording-installed-packages
Because of this, libraries such as pkg_resources.find_distributions (or the modern equivalent, I suppose: https://github.com/pypa/packaging-problems/issues/664) fail to notice its existence.
Steps to reproduce
- install opencv
- Run this at the interpreter:
import pkg_resources
ws = list(pkg_resources.find_distributions('/path/to/your//lib/python3.10/site-packages/'))
pkg_resources.require('opencv-python')
- Observe it fails with:
DistributionNotFound: The 'opencv-python' distribution was not found and is required by the application
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
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.
Assessment
This issue has not been assessed yet.