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

TypeError: 'numpy._DTypeMeta' object is not subscriptable #69

Closed
sjbeskur opened this issue Oct 8, 2023 · 3 comments
Closed

TypeError: 'numpy._DTypeMeta' object is not subscriptable #69

sjbeskur opened this issue Oct 8, 2023 · 3 comments

Comments

@sjbeskur
Copy link

sjbeskur commented Oct 8, 2023

Tried running the example script but I get this strange error when trying to import LightGlue

from lightglue import LightGlue 
.. 
.. <stack trace>
TypeError: 'numpy._DTypeMeta' object is not subscriptable

Seems to be using some typed implementation of numpy? Any guidance would be greatly appreciated.

@sjbeskur
Copy link
Author

sjbeskur commented Oct 8, 2023

forget it .. this is an issue with mismatched version of OpenCV / Numpy

this fixed it:

sudo apt remove python3-numpy && pip3 install numpy.

in case anyone cares

@sarlinpe
Copy link
Member

sarlinpe commented Oct 8, 2023

What versions cause a conflict?

@sjbeskur
Copy link
Author

I was using version 4.6 of OpenCV but I didn't check what version of numpy I had installed (terribly sorry).
I updated both to the following:

import cv2 as cv
import numpy as np
np.version.version
'1.26.0'

cv.version.opencv_version
'4.8.1.78'

Everything seems to work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants