#πŸ”’ To Install Mediapipe

72 messages Β· Page 1 of 1 (latest)

fast remnant
#

I wanna install Mediapipe on ARM on MacOS 14.3, I've tried venvs, manually installing wheels etc

chilly roseBOT
#

@fast remnant

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

fast remnant
#
Python 3.12.2 (v3.12.2:6abddd9f6a, Feb  6 2024, 17:02:06) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
tired maple
#

Oh that's not the output I anticipated.

#

Hold on.

fast remnant
#

So anyways this was cuz I tried manually installing the arm wheel of mediapipe and it said not compatible and then pip3 install mediapipe installed an old x86 version and I think that's causing issues

#

so mediapipe is an ml library right?

tired maple
#

can you do the following?
python3.12 -c "import platform; platform.platform()" and print the output?

fast remnant
#

so I go on to install tensorflow (pip3 install tensorflow) also installs the x86 version and now whenever I try python3 filename.py, I get:zsh: illegal hardware instruction /Users/munmun/opt/anaconda3/envs/lumos/bin/python

tired maple
#

You can't just pip3 install anymore.

#

You have like 30 different Python's installed.

#

python3.12 -m pip install <blah>

fast remnant
#

wait how do you know

#

i have 30 pythons installed

tired maple
#

I'm a wizard (but also you told us, I was speaking in hyperbole.)

#

Mediapipe doesn't have any wheels built for 3.12

fast remnant
#

(oh yeah) also i finally figured out venvs and so I'm on one using 3.11.8 for that reason

tired maple
#

So you're going to have... more issues than just what we're discussing.

#

ok.

fast remnant
#

so it's installed 9.1.3 for me, x86 version

tired maple
#

Let's slow down a little bit.

fast remnant
#

ok

tired maple
#

What version of Python are you trying to install Mediapipe into?

fast remnant
#

whatever works - currently 3.11.8, on a conda venv

tired maple
#

holy cow.

#

πŸ₯΄

fast remnant
#

what?

tired maple
#

Alright, some professional advice first.

#
  • You have many Python's installed, and you're kind of compounding your problem by adding on Conda on top of all the different Python's you have installed.
fast remnant
tired maple
#

Cool. Can you do a python3.11 -c "import platform; platform.platform()" and print out the output for me?

fast remnant
#

I did it - there was no output

tired maple
#

huh.

#

oh

#

duh

#
python3.11 -c "import platform; print(platform.platform())"```
fast remnant
#
macOS-10.16-x86_64-i386-64bit

i get it, it should be arm

tired maple
#

πŸ˜„

fast remnant
#

hold up

tired maple
#

Well this is going to be fun.

fast remnant
#

wait wait wait

#

1 sec

#

i might be running rosetta

tired maple
#

You are.

fast remnant
#

well that's an easy enough fix then? install it with no rosetta?

#

on a native terminal, I have received the output: macOS-14.3-arm64-arm-64bit with the same command, that's good news right?

#

but not with the venv

#

so only conda is running rosetta

#

but now on my py3.12 installation, I haven't installed mediapipe and when i run pip3 install mediapipe, I get bash ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none) ERROR: No matching distribution found for mediapipe

tired maple
#

Sorry I got distracted with something.

fast remnant
#

np

tired maple
#

There is no Mediapipe wheel for 3.12

fast remnant
#

oh right

tired maple
#

You must install it in 3.11 (or earlier, to 3.9 I believe.)

fast remnant
#

now when I did have 3.9, it installed 9.1

#

the same as conda

tired maple
#

I'm unfamiliar with Mediapipe to that regard, but Conda has a different package index.

fast remnant
#

from my researching of the mediapipe docs, version 9.3 is when arm support for mac was introduced, therefore I think version 9.1 won't work

tired maple
#

That sounds... accurate.

#

Something's goofy with Rosetta being present when you installed something.

fast remnant
#

hmm

#

arch returns arm64

dreamy locust
#

in case

fast remnant
#

ok?

dreamy locust
#

I helped someone find a really old version of mediapipe before and they installed it by downloading the release from the github

fast remnant
#

nice

dreamy locust
#

it's probably painful but the option exists if nothing else works for you

fast remnant
#

ye

chilly roseBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.