I have this requirments.txt file:
confluent-kafka[avro]==1.1.0
When I run the command -
$ pip3 install -r requirments.txt
This is the errors I received:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/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/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-record-60zlo4l3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/confluent-kafka
cwd: /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/
Complete output (34 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.9
creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka
copying confluent_kafka/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka
creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/admin
copying confluent_kafka/admin/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/admin
creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
copying confluent_kafka/avro/error.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
copying confluent_kafka/avro/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
copying confluent_kafka/avro/cached_schema_registry_client.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
copying confluent_kafka/avro/load.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro
creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_client.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_consumer.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_producer.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/kafkatest
creating build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro/serializer
copying confluent_kafka/avro/serializer/__init__.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro/serializer
copying confluent_kafka/avro/serializer/message_serializer.py -> build/lib.macosx-10.15-x86_64-3.9/confluent_kafka/avro/serializer
running build_ext
building 'confluent_kafka.cimpl' extension
creating build/temp.macosx-10.15-x86_64-3.9
creating build/temp.macosx-10.15-x86_64-3.9/confluent_kafka
creating build/temp.macosx-10.15-x86_64-3.9/confluent_kafka/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c confluent_kafka/src/Admin.c -o build/temp.macosx-10.15-x86_64-3.9/confluent_kafka/src/Admin.o
In file included from confluent_kafka/src/Admin.c:17:
confluent_kafka/src/confluent_kafka.h:22:10: fatal error: 'librdkafka/rdkafka.h' file not found
#include <librdkafka/rdkafka.h>
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-d8igj48w/confluent-kafka_abe9a32f37bd4b23be43de3e07b30fb2/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/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-record-60zlo4l3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/confluent-kafka Check the logs for full command output.
The python version used is -
$ python3 --version
Python 3.9.5
What is the issue here and how to solve it?
You need the .h development headers. sudo apt install librdkafka-dev
Related
I have been trying to install PyAudio but I can't.
I have tried the Homebrew method and the Xcode method:
xcode-select --install
brew remove portaudio
brew install portaudio
pip3 install pyaudio
I even tried this command
pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio
I also tried
pip3 install pyaudio
and
pip install pyaudio
I keep getting this error
/Users/firassyed/opt/anaconda3/envs/env_pytorch/lib/python3.6/site-packages/pip/_internal/commands/install.py:245: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Skipping wheel build for pyaudio, due to binaries being disabled for it.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Users/firassyed/opt/anaconda3/envs/env_pytorch/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-pbxf5s_a/pyaudio_3976f98c4d7440d3bbb5800ecc3b675d/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-pbxf5s_a/pyaudio_3976f98c4d7440d3bbb5800ecc3b675d/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'"'"'))' build_ext -I/usr/local/include -L/usr/local/lib install --record /private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-record-i_lptc1z/install-record.txt --single-version-externally-managed --compile --install-headers /Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m/pyaudio
cwd: /private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-pbxf5s_a/pyaudio_3976f98c4d7440d3bbb5800ecc3b675d/
Complete output (11 lines):
running build_ext
building '_portaudio' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include -arch x86_64 -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include -arch x86_64 -DMACOSX=1 -I/usr/local/include -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.6/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: /Users/firassyed/opt/anaconda3/envs/env_pytorch/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-pbxf5s_a/pyaudio_3976f98c4d7440d3bbb5800ecc3b675d/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-pbxf5s_a/pyaudio_3976f98c4d7440d3bbb5800ecc3b675d/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'"'"'))' build_ext -I/usr/local/include -L/usr/local/lib install --record /private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-record-i_lptc1z/install-record.txt --single-version-externally-managed --compile --install-headers /Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m/pyaudio Check the logs for full command output.
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/firassyed/opt/anaconda3/envs/env_pytorch/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/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/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-wheel-rw8wdejj
cwd: /private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.6
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include -arch x86_64 -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include -arch x86_64 -DMACOSX=1 -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.6/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: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Users/firassyed/opt/anaconda3/envs/env_pytorch/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/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/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-record-9pe8tglt/install-record.txt --single-version-externally-managed --compile --install-headers /Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m/pyaudio
cwd: /private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/
Complete output (18 lines):
running install
/Users/firassyed/opt/anaconda3/envs/env_pytorch/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.6
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include -arch x86_64 -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include -arch x86_64 -DMACOSX=1 -I/Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.6/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: /Users/firassyed/opt/anaconda3/envs/env_pytorch/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-install-ozic18ff/pyaudio_0f1cab72b9cf407cb344f0b0fc90d0e4/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/j0/5j_xyczd6ddc5z2hm8wsbpwr0000gn/T/pip-record-9pe8tglt/install-record.txt --single-version-externally-managed --compile --install-headers /Users/firassyed/opt/anaconda3/envs/env_pytorch/include/python3.6m/pyaudio Check the logs for full command output.
Try:
pip install pipwin
pipwin install pyaudio
I am using python 3.9.7
PS C:\Program Files\Python39> pip install web3
...
This is the part where it's in red error message:
Running setup.py install for bitarray ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\QUI\\AppData\\Local\\Temp\\pip-install-8r0e8eer\\bitarray_3b8d63f53f724d4f910c7c1d5014a41b\\setup.py'"'"'; __file__='"'"'C:\\Users\\QUI\\AppData\\Local\\Temp\\pip-install-8r0e8eer\\bitarray_3b8d63f53f724d4f910c7c1d5014a41b\\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 'C:\Users\QUI\AppData\Local\Temp\pip-record-107_ynkk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\QUI\AppData\Roaming\Python\Python39\Include\bitarray'
cwd: C:\Users\QUI\AppData\Local\Temp\pip-install-8r0e8eer\bitarray_3b8d63f53f724d4f910c7c1d5014a41b\
Complete output (13 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.9\bitarray copying bitarray\test_util.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\util.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\__init__.py -> build\lib.win-amd64-3.9\bitarray
running build_ext
building 'bitarray._bitarray' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with
"Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\QUI\AppData\Local\Temp\pip-install-8r0e8eer\bitarray_3b8d63f53f724d4f910c7c1d5014a41b\setup.py'"'"'; file='"'"'C:\Users\QUI\AppData\Local\Temp\pip-install-8r0e8eer\bitarray_3b8d63f53f724d4f910c7c1d5014a41b\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 'C:\Users\QUI\AppData\Local\Temp\pip-record-107_ynkk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\QUI\AppData\Roaming\Python\Python39\Include\bitarray' Check the logs for full command output.
I'm trying to install web3 module for python and I keep getting that is connected to bitarray. hare's the error I keep getting:
error
ERROR: Command errored out with exit status 1:
command: 'c:\users\l\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\l\\AppData\\Local\\Temp\\pip-install-6nq49h42\\bitarray_762632bbfc03447084c19315d24278db\\setup.py'"'"';
__file__='"'"'C:\\Users\\l\\AppData\\Local\\Temp\\pip-install-6nq49h42\\bitarray_762632bbfc03447084c19315d24278db\\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 'C:\Users\l\AppData\Local\Temp\pip-record-2_4t1ncs\install-record.txt' --single-version-externally-managed --compile
--install-headers 'c:\users\l\appdata\local\programs\python\python39\Include\bitarray'
cwd: C:\Users\l\AppData\Local\Temp\pip-install-6nq49h42\bitarray_762632bbfc03447084c19315d24278db\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\test_util.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\util.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\__init__.py -> build\lib.win-amd64-3.9\bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\bitarray
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\l\appdata\local\programs\python\python39\include -Ic:\users\l\appdata\local\programs\python\python39\include /Tcbitarray/_bitarray.c /Fobuild\temp.win-amd64-3.9\Release\bitarray/_bitarray.obj
error: command 'cl.exe' failed: None
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\l\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\l\\AppData\\Local\\Temp\\pip-install-6nq49h42\\bitarray_762632bbfc03447084c19315d24278db\\setup.py'"'"'; __file__='"'"'C:\\Users\\l\\AppData\\Local\\Temp\\pip-install-6nq49h42\\bitarray_762632bbfc03447084c19315d24278db\\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 'C:\Users\l\AppData\Local\Temp\pip-record-2_4t1ncs\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\l\appdata\local\programs\python\python39\Include\bitarray' Check the logs for full command output.
I tried installing pyaudio this way (it's probably worth noting that I'm currently using an M1 MacBook):
brew install portaudio
pip install pyaudio
and encountered this problem:
zsh: command not found: pip
Then I tried using:
python3 -m install pyaudio
and this is what happened:
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 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-install-l9y2ss43/pyaudio_082af32b7df940b88c2b176ce46b477e/setup.py'"'"'; __file__='"'"'/private/var/folders/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-install-l9y2ss43/pyaudio_082af32b7df940b88c2b176ce46b477e/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/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-record-9sps13ds/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/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-install-l9y2ss43/pyaudio_082af32b7df940b88c2b176ce46b477e/
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 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-install-l9y2ss43/pyaudio_082af32b7df940b88c2b176ce46b477e/setup.py'"'"'; __file__='"'"'/private/var/folders/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-install-l9y2ss43/pyaudio_082af32b7df940b88c2b176ce46b477e/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/t8/c4fh02g911z6jksqbs6qlg080000gn/T/pip-record-9sps13ds/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.
Any idea how I could fix this and get pyaudio to be installed in my computer?
When trying to install Instapy on a Mac, it runs fine until I get this error. It also brings up a call box saying The "gcc" command requires the command line developer tools. Would you like to install the tools now? I click yes, the program runs for a little then says Can't install the software because it is not currently available from the Software Update Server. Might be something with trying to install regex in conjunction with Instapy. Please advise.
Error code:
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/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-install-zvp3cah2/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-install-zvp3cah2/regex/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/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-record-gqcrl4uz/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/regex
cwd: /private/var/folders/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-install-zvp3cah2/regex/
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/regex.py -> build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/_regex_core.py -> build/lib.macosx-10.9-x86_64-3.8/regex
copying regex_3/test_regex.py -> build/lib.macosx-10.9-x86_64-3.8/regex
running build_ext
building 'regex._regex' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/regex_3
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c regex_3/_regex.c -o build/temp.macosx-10.9-x86_64-3.8/regex_3/_regex.o
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
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/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-install-zvp3cah2/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-install-zvp3cah2/regex/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/ls/n78nsrps7g11kns59t2n659r0000gn/T/pip-record-gqcrl4uz/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/regex Check the logs for full command output.
Figured it out. I needed to download xcode. That updates everything on the developer end. Tried re-installing Instapy and it went right through. Also got regex in there as well. Woo!