Giter Site home page Giter Site logo

error installing on mac M1 system about pyo HOT 5 OPEN

dandante avatar dandante commented on August 23, 2024
error installing on mac M1 system

from pyo.

Comments (5)

RobertArbon avatar RobertArbon commented on August 23, 2024 1

hey - I've almost got this working.

I had to:

  • reinstall homebrew and make sure all the dependencies are in the right place.
  • clone the git repo and install using sudo python setup.py install --use-coreaudio --use-double
  • fix the occaisional problem with it not finding header files by looking at the error message and making appropriate symbolic links to the various header file directories.

However - it's still not working but that's because of a bad link to an internal module which i'm tempted make a PR for. Not much help but it will get you closer to it working.

from pyo.

scfleming avatar scfleming commented on August 23, 2024 1

Had same issue on M1 Mac. Got this to work with normal pip install:

Edit your shell of choice with the following:

(if using bash, use export CFLAGS= syntax instead...)
setenv CFLAGS '-I/opt/homebrew/include/'
setenv LDFLAGS '-L/opt/homebrew/lib/'

Make sure you install portaduio using brew, as you've done already. I then got pip install pyo to install successfully since it will now compile the needed libraries looking in /opt/homebrew/ instead of /usr/local/

Hope this helps...

from pyo.

RobertArbon avatar RobertArbon commented on August 23, 2024

Actually - this still doesn't work. I'm at a loss.

from pyo.

dandante avatar dandante commented on August 23, 2024

Thanks for all the comments everyone. I finally got this to work.

I had to install the following packages using brew:

portmidi
libsndfile
(maybe others that I have forgotten - but error messages should suggest what else you need to install).

I cloned this repo, cd'd to it, and activated a pre-existing virtual environment (you don't have to do this, but that's why I didn't install with sudo).

Then I set up the following variables in order to build:

export LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH"
export CFLAGS='-I/opt/homebrew/include/'
export LDFLAGS='-L/opt/homebrew/lib/'

Then I just ran python setup.py install.

One weird thing is when I first tested it with python -c 'import pyo' I got an error, but all I had to do was change to a different directory. I went one level up (cd ..) and ran python -c 'import pyo' again and it worked.

Hopefully this helps someone.

from pyo.

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.