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

portaudio error on pip install #265

Open
zseramnay opened this issue Apr 1, 2023 · 2 comments
Open

portaudio error on pip install #265

zseramnay opened this issue Apr 1, 2023 · 2 comments

Comments

@zseramnay
Copy link

I'm installing with pip from the anaconda terminal.

Best

Yan

creating build/temp.macosx-10.9-x86_64-cpython-39/src/objects
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/yanmaresz/opt/anaconda3/include -arch x86_64 -I/Users/yanmaresz/opt/anaconda3/include -fPIC -O2 -isystem /Users/yanmaresz/opt/anaconda3/include -arch x86_64 -DUSE_PORTAUDIO -DUSE_PORTMIDI -DUSE_OSC -Iinclude -I/usr/local/Cellar/liblo/0.31/include -I/usr/local/Cellar/libsndfile/1.2.0/include -I/usr/local/Cellar/portaudio/19.7.0/include -I/usr/local/Cellar/portmidi/2.0.4/include -I/Users/yanmaresz/opt/anaconda3/include/python3.9 -c src/engine/ad_portaudio.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/engine/ad_portaudio.o -Wno-strict-prototypes -Wno-strict-aliasing -O3 -g0 -DNDEBUG
In file included from src/engine/ad_portaudio.c:21:
include/ad_portaudio.h:25:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyo

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@zseramnay
Copy link
Author

I have :
/usr/local/include/portaudio.h
/usr/local/Cellar/portaudio/19.7.0/include/portaudio.h

did :
export LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH"
export CPATH="/opt/homebrew/include:$CPATH"

and still not able to install pyo.
Yan

@scfleming
Copy link

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...

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