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

Invalid mediapipe version in requirements.txt #82

Open
AshkanArabim opened this issue Jan 27, 2025 · 2 comments
Open

Invalid mediapipe version in requirements.txt #82

AshkanArabim opened this issue Jan 27, 2025 · 2 comments

Comments

@AshkanArabim
Copy link

When I try to install the project dependencies with uv, I get this error:

╭─ashkan@xps ~/Desktop/spring 25/computer_vision/testing/hagrid ‹master› 
╰─$ uv venv --python 3.11
Using CPython 3.11.11
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
╭─ashkan@xps ~/Desktop/spring 25/computer_vision/testing/hagrid ‹master› 
╰─$ source .venv/bin/activate
(hagrid) ╭─ashkan@xps ~/Desktop/spring 25/computer_vision/testing/hagrid ‹master› 
╰─$ uv pip install -r requirements.txt 
  × No solution found when resolving dependencies:
  ╰─▶ Because there is no version of mediapipe==0.10.3 and you require mediapipe==0.10.3, we can conclude that your requirements are
      unsatisfiable.
(hagrid) ╭─ashkan@xps ~/Desktop/spring 25/computer_vision/testing/hagrid ‹master› 
╰─$        

Checking mediapipe's PyPI page confirms that there's no 0.10.3 version of mediapipe.

@AshkanArabim
Copy link
Author

AshkanArabim commented Jan 27, 2025

Apparently mediapipe is removing old versions from PyPI because they're hitting a storage limit. Sad times we live in :/

It would be nice if you could maybe migrate to a newer version to resolve this.

@AshkanArabim
Copy link
Author

Here are all available mediapipe versions I've tried:

0.10.5, 0.10.7, 0.10.8:

(hagrid) ╭─ashkan@xps ~/Desktop/spring 25/computer_vision/testing/hagrid ‹master●› 
╰─$ python ./demo.py -p ./configs/MobileNetV3_small.yaml --landmarks

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/./demo.py", line 6, in <module>
    import albumentations as A
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/__init__.py", line 5, in <module>
    from .augmentations import *
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/augmentations/__init__.py", line 2, in <module>
    from .blur.functional import *
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/augmentations/blur/__init__.py", line 1, in <module>
    from .functional import *
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/augmentations/blur/functional.py", line 5, in <module>
    import cv2
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/home/ashkan/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
AttributeError: _ARRAY_API not found
Traceback (most recent call last):
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/./demo.py", line 6, in <module>
    import albumentations as A
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/__init__.py", line 5, in <module>
    from .augmentations import *
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/augmentations/__init__.py", line 2, in <module>
    from .blur.functional import *
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/augmentations/blur/__init__.py", line 1, in <module>
    from .functional import *
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/albumentations/augmentations/blur/functional.py", line 5, in <module>
    import cv2
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ashkan/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: numpy.core.multiarray failed to import

0.10.20, 0.10.18, 0.10.15, 0.10.14, 0.10.13, 0.10.11, 0.10.10, 0.10.9:

(hagrid) ╭─ashkan@xps ~/Desktop/spring 25/computer_vision/testing/hagrid ‹master●› 
╰─$ python ./demo.py -p ./configs/MobileNetV3_small.yaml --landmarks
/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/.venv/lib/python3.11/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1737968236.925086 3930021 gl_context_egl.cc:85] Successfully initialized EGL. Major : 1 Minor: 5
I0000 00:00:1737968236.929015 3930483 gl_context.cc:369] GL version: 3.2 (OpenGL ES 3.2 Mesa 24.3.4-arch1.1), renderer: Mesa Intel(R) UHD Graphics (TGL GT1)
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
W0000 00:00:1737968236.949740 3930465 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1737968236.959396 3930474 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
Traceback (most recent call last):
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/./demo.py", line 166, in <module>
    Demo.run(model, transform, conf.test_transforms, num_hands=100, threshold=0.8, landmarks=args.landmarks)
  File "/home/ashkan/Desktop/spring 25/computer_vision/testing/hagrid/./demo.py", line 95, in run
    output = detector([processed_image])[0]
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 0

I can't find any way to run the demo at the moment.

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

1 participant