Git Product home page Git Product logo

Comments (12)

juharris avatar juharris commented on August 15, 2024

There are some relevant forum posts here on how to set it up.

Basically you need to add the sdk/myo.framework folder of the Mac SDK to your PATH. So if the folder is in /home/pdyba/myo/sdk/myo.framework, then add /home/pdyba/myo/sdk/myo.framework to your PATH.

Let me know if you get it working and I'll add the steps to the README.

from myo-python.

juharris avatar juharris commented on August 15, 2024

I guess I assumed that you're using a Mac because you linked to those forum posts. So what are you using?

from myo-python.

pdyba avatar pdyba commented on August 15, 2024

I'm using mac os 10.10 and pycharm my myo files are at /library/frameworks/
and I'v got error:

Error loading "myo". Make sure that it is in your path.
Using Python 3
Traceback (most recent call last):
File "/Users/Piotr/PycharmProjects/myo_t1/hello_myo.py", line 9, in
myo.init()
File "/Users/Piotr/PycharmProjects/myo_t1/myo/lowlevel.py", line 125, in init
lib = ctypes.cdll.LoadLibrary(lib_name)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/init.py", line 429, in LoadLibrary
return self._dlltype(name)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/init.py", line 351, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(myo, 6): no suitable image found. Did find:
myo: not a file

so I've forked Your version and added 2 comments:
https://github.com/pdyba/myo-python-1
lowlevel.py line 105 is the one more important I wanted to branch Your but could not push.
It works great now :)
Cheers ! :)

from myo-python.

juharris avatar juharris commented on August 15, 2024

​​I see but if you add the folder containing myo to your PATH then it should work. So add '/Library/frameworks/myo.framework' to your PATH​. If you're running in the command line, do:

export PATH=$PATH:/Library/frameworks/myo.framework

from myo-python.

pdyba avatar pdyba commented on August 15, 2024

export PATH=$PATH:/Library/frameworks/myo.framework
does not work a) permanently b) at all
I've tried that before and even added that line to /etc/paths/
and got still the same error

I'm still having fun:
if pose == pose_t.double_tap:
system('say Look')
elif pose == pose_t.wave_in:
system('say I am')
elif pose == pose_t.wave_out:
system('say Your')
elif pose == pose_t.fist:
system('say Father')

:)

from myo-python.

juharris avatar juharris commented on August 15, 2024

That's right it's not a permanent solution. I'm not sure how to add stuff permanently to your PATH on Mac but once you do it, you'll have to close and re-open whatever program you're running the myo-python in (Terminal/IDE).

Also lol but it's "Luke" not "Look".

from myo-python.

pdyba avatar pdyba commented on August 15, 2024

it work permanently after adding to /etc/paths/ for terminal i can write "myo" and get -bash: /Library/frameworks/myo.framework/myo: cannot execute binary file
but I got still the same error in python - OSError

look was the point ;) but never mind I am thinking about a different use:
"Vaders choaking simulator" and I know that I'm only interested in "finger date" the one thing that does not ring a bell is "emg" but even when hand is immobilized it gives me "random" numbers so I'm wondering what would You use to focus just on the fingers ?

from myo-python.

juharris avatar juharris commented on August 15, 2024

You can probably train some model using the EMG data to figure out what the fingers are doing. I suggest a sequential classifier like a CRF or HMM. I recommend CRFsuite. Of course you'll have to label data yourself to say for each EMG array to say what they mean. I started doing something similar here in another branch to detect sign language using a HMM with Scikit Lean but that was before EMG was available so it uses the other data and didn't work very well. That code guides to user in order to tell them to do certain things and labels the data for you.

Anyway we're kinda going on a tangent about the initial issue. So you still can't get the library to work as is even though myo is in your PATH? Are you running this library in an IDE or in the Terminal?

from myo-python.

pdyba avatar pdyba commented on August 15, 2024

IDE Pycharm and terminal give me all the same error ;/ and I'm using pure copy from github.
command myo in terminal work perfectly... but

os.path.abspath('myo')
'/Users/Piotr/myo'
and it is as above at /Library/frameworks/myo.framework

from myo-python.

juharris avatar juharris commented on August 15, 2024

os.path.abspath doesn't try to find things in your PATH. It makes a path for the folder that you give it. So '/Users/Piotr/myo' makes sense for os.path.abspath to return. Could you try adding /Library/frameworks/myo.framework/myo to your PATH?

from myo-python.

sgzsh269 avatar sgzsh269 commented on August 15, 2024

Hey guys, the solution is to add the myo.framework directory path to DYLD_LIBRARY_PATH since the myo binary is a dynamic lib.
Already tried it, works properly!

from myo-python.

juharris avatar juharris commented on August 15, 2024

Awesome! I'll update the README tomorrow.

Justin Harris | [email protected]
On Jan 10, 2015 12:07 AM, "Sagar Nilesh Shah" [email protected]
wrote:

Hey guys, the solution is to add it to DYLD_LIBRARY_PATH since it is a
dynamic lib.
Already tried it, works properly!


Reply to this email directly or view it on GitHub
#10 (comment).

from myo-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.