Import tinyobjloader in python - python

I'm trying to import tinyobjloader in my PyOpenGL project on PyCharm for an assignment, but I keep getting this error
ModuleNotFoundError: No module named 'tinyobjloader'
I've installed tinyobjloader with pip3 on my Mac.
When I try to install the package in the PyCharm preferences, I get this:
Collecting tinyobjloader
Using cached tinyobjloader-0.1.tar.gz (3.1 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: tinyobjloader
Building wheel for tinyobjloader (setup.py): started
Building wheel for tinyobjloader (setup.py): finished with status 'error'
Running setup.py clean for tinyobjloader
Failed to build tinyobjloader
Installing collected packages: tinyobjloader
Running setup.py install for tinyobjloader: started
Running setup.py install for tinyobjloader: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/assignment2/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/setup.py'"'"'; __file__='"'"'/private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-wheel-41q_dg59
cwd: /private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/
Complete output (11 lines):
running bdist_wheel
running build
running build_ext
creating build
creating build/temp.macosx-10.9-x86_64-3.8
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I../ -I../pybind11/include -I/Users/assignment2/venv/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c bindings.cc -o build/temp.macosx-10.9-x86_64-3.8/bindings.o -std=c++11
bindings.cc:1:10: fatal error: 'pybind11/pybind11.h' file not found
#include "pybind11/pybind11.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for tinyobjloader
ERROR: Command errored out with exit status 1:
command: /Users/assignment2/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/setup.py'"'"'; __file__='"'"'/private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-record-_ftffefa/install-record.txt --single-version-externally-managed --compile --install-headers /Users/assignment2/venv/include/site/python3.8/tinyobjloader
cwd: /private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/
Complete output (13 lines):
running install
/Users/assignment2/venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
creating build
creating build/temp.macosx-10.9-x86_64-3.8
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I../ -I../pybind11/include -I/Users/assignment2/venv/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c bindings.cc -o build/temp.macosx-10.9-x86_64-3.8/bindings.o -std=c++11
bindings.cc:1:10: fatal error: 'pybind11/pybind11.h' file not found
#include "pybind11/pybind11.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/assignment2/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/setup.py'"'"'; __file__='"'"'/private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-install-n2ikxhrd/tinyobjloader_e31de4c63a314c94a6b7729348292448/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/mc/1f9c4_mn1p93n0ynhkb96ctc0000gn/T/pip-record-_ftffefa/install-record.txt --single-version-externally-managed --compile --install-headers /Users/assignment2/venv/include/site/python3.8/tinyobjloader Check the logs for full command output.

Related

Error installing pyaudio from PyCharm on OSX

I get an error when trying to install this package on OSX through PyCharm. Couldn't find a solution, hopefully someone here has some advice.
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
Installing collected packages: PyAudio
Running setup.py install for PyAudio: started
Running setup.py install for PyAudio: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-install-mgmh8bxy/pyaudio_b6de439398d54d48abcfffdaaf01cc38/setup.py'"'"'; __file__='"'"'/private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-install-mgmh8bxy/pyaudio_b6de439398d54d48abcfffdaaf01cc38/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-record-j0kk4n9l/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyAudio
cwd: /private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-install-mgmh8bxy/pyaudio_b6de439398d54d48abcfffdaaf01cc38/
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.9
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.9/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-install-mgmh8bxy/pyaudio_b6de439398d54d48abcfffdaaf01cc38/setup.py'"'"'; __file__='"'"'/private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-install-mgmh8bxy/pyaudio_b6de439398d54d48abcfffdaaf01cc38/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/r8/_5x4wg2j36l8zrdh1ql_2vrh0000gn/T/pip-record-j0kk4n9l/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyAudio Check the logs for full command output.
WARNING: You are using pip version 21.1.3; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python3.9 -m pip install --upgrade pip' command.
The same error occurs with Omnizart :(
The last PyAudio release was in 2017, it doesn't have wheels for Python 3.9 which means no easy installation process for you - one has to compile C code on the local machine. Unfortunately, the compiling process fails as you have missing dependencies namely portaudio. You need to install it, see the relevant question when installing pyaudio, pip cannot find portaudio.h in /usr/local/include.
Speaking of omnizart - not sure which error do you get, I pretty much doubt it is about portaudio. To start with - make sure to install all the dependencies as suggested in omnizart repo: https://github.com/Music-and-Culture-Technology-Lab/omnizart/issues/29#issuecomment-877557801.

Error when trying to install pyodbc in virtualenv

I am trying to install pyodbc in a virtual environment. The following command line commands shows the steps:
>python3.9 -m venv .venv
>source .venv/bin/activate
>pip install pyodbc
and then I get the following error:
Collecting pyodbc
Using cached pyodbc-4.0.32.tar.gz (280 kB)
Building wheels for collected packages: pyodbc
Building wheel for pyodbc (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ebp/Documents/studies/docker_test/.venv/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9moe3om/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k9moe3om/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-0qe855ng
cwd: /tmp/pip-install-k9moe3om/pyodbc/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for pyodbc
Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc
Running setup.py install for pyodbc ... error
ERROR: Command errored out with exit status 1:
command: /home/ebp/Documents/studies/docker_test/.venv/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9moe3om/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k9moe3om/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-kb5_zw4a/install-record.txt --single-version-externally-managed --compile --install-headers /home/ebp/Documents/studies/docker_test/.venv/include/site/python3.9/pyodbc
cwd: /tmp/pip-install-k9moe3om/pyodbc/
Complete output (14 lines):
running install
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYODBC_VERSION=4.0.32 -I/home/ebp/Documents/studies/docker_test/.venv/include -I/usr/include/python3.9 -c src/buffer.cpp -o build/temp.linux-x86_64-3.9/src/buffer.o -Wno-write-strings -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/local/include
In file included from src/buffer.cpp:12:
src/pyodbc.h:45:10: fatal error: Python.h: No such file or directory
45 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ebp/Documents/studies/docker_test/.venv/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9moe3om/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k9moe3om/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-kb5_zw4a/install-record.txt --single-version-externally-managed --compile --install-headers /home/ebp/Documents/studies/docker_test/.venv/include/site/python3.9/pyodbc Check the logs for full command output.
I am using wsl ubuntu. In my wsl system I have already installed pyodbc with success, but in virtual environment it can't be done. What am I doing wrong?
I solved the problem by installing python3.9-dev on linux:
> sudo apt-get install python3.9-dev

I am trying to install pyaudio on Mac and getting the following error

% pip3 install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-install-yuqomyva/pyaudio_df9e48fd3dc447b18c59302d7aac4fe2/setup.py'"'"'; file='"'"'/private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-install-yuqomyva/pyaudio_df9e48fd3dc447b18c59302d7aac4fe2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-record-kg79q2az/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyaudio
cwd: /private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-install-yuqomyva/pyaudio_df9e48fd3dc447b18c59302d7aac4fe2/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.9
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.9/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-install-yuqomyva/pyaudio_df9e48fd3dc447b18c59302d7aac4fe2/setup.py'"'"'; file='"'"'/private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-install-yuqomyva/pyaudio_df9e48fd3dc447b18c59302d7aac4fe2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/41/jq1tn1b113b6nmbmpqqfxhrr0000gn/T/pip-record-kg79q2az/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyaudio Check the logs for full command output.
Try:
pip install pipwin
And:
pipwin install pyaudio
Hope It Helps :D

Error While installing PyAudio in macOS: How can I fix this problem?

I was trying to install PyAudio
The system is macOS Mojave, and version of Python is 3.8
I think pip doesn't have any problem, but some frameworks are collided with pyaudio
here are error message shown.
What should I do?
pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-install-b7gmavn1/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-install-b7gmavn1/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-record-zz9o5bbq/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyaudio
cwd: /private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-install-b7gmavn1/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-install-b7gmavn1/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-install-b7gmavn1/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hq/cp10yz710x51x0qsxlrj5s5m0000gn/T/pip-record-zz9o5bbq/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyaudio Check the logs for full command output.
Try installing pipwin first using:
pip install pipwin
and then install Pyaudio using pipwin:
pipwin install PyAudio

Can't install pyaudio at python 2.7 on MacOS

I typed: pip install pyaudio
and then it says:
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy setup.py install for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-install-vpovlb7i/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-install-vpovlb7i/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-record-ek_hs7p1/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyaudio
cwd: /private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-install-vpovlb7i/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-install-vpovlb7i/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-install-vpovlb7i/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/wj/x_g39c7n4pn_mrmpq2m35b0c0000gn/T/pip-record-ek_hs7p1/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pyaudio Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.2 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m pip install --upgrade pip' command.
This is being installed under python3, So I would recommend you to run this under a virtual environment https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-and-using-virtualenv-with-Python-2 , then try trying this back again while venv being activated

Categories

Resources