Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing Python distribution metadata #944

Open
3 of 4 tasks
Apteryks opened this issue Jan 4, 2024 · 0 comments
Open
3 of 4 tasks

missing Python distribution metadata #944

Apteryks opened this issue Jan 4, 2024 · 0 comments
Assignees
Labels

Comments

@Apteryks
Copy link

Apteryks commented Jan 4, 2024

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: pypa/packaging-problems#664) fail to notice its existence.

Steps to reproduce

  1. install opencv
  2. 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')
  1. 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)
@Apteryks Apteryks added the bug label Jan 4, 2024
@asmorkalov asmorkalov transferred this issue from opencv/opencv Jan 6, 2024
@asmorkalov asmorkalov self-assigned this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants