Error installing pandas_profiling with Pip on Ubuntu 20.04 - linux

pip install pandas_profiling
fails at
Running setup.py install for Bottleneck ... error
ERROR: Command errored out with exit status 1:
command: /home/me/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/setup.py'"'"'; file='"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/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 /tmp/pip-record-pgrmqqqd/install-record.txt --single-version-externally-managed --compile --install-headers /home/me/venv/include/site/python3.9/Bottleneck
cwd: /tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/
Complete output (15 lines):
running install
running build
running build_py
running build_ext
building 'bottleneck.reduce' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/bottleneck
creating build/temp.linux-x86_64-3.9/bottleneck/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 -I/home/me/venv/lib/python3.9/site-packages/numpy/core/include -I/home/me/venv/include -I/usr/include/python3.9 -c bottleneck/src/reduce.c -o build/temp.linux-x86_64-3.9/bottleneck/src/reduce.o -O2
In file included from bottleneck/src/reduce.c:1:
bottleneck/src/bottleneck.h:4:10: fatal error: Python.h: No such file or directory
4 | #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/me/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/setup.py'"'"'; file='"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/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 /tmp/pip-record-pgrmqqqd/install-record.txt --single-version-externally-managed --compile --install-headers /home/me/venv/include/site/python3.9/Bottleneck Check the logs for full command output.
I am on Ubuntu 20.04 and my python version is-
Python 3.9.0+
I tried installing Bottleneck separately,
pip install Bottleneck --no-cache-dir
but that also gives the same error. Have looked solutions to related topics,
fatal error: Python.h: No such file or directory
setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for bottleneck error
but no luck. Any help would be appreciated.

So.. finally this is what made it work... had to install python3.9-dev.

Related

Failed building wheel for spidev

Following the documentation I am installing spidev with
pip3 install spidev
in Python 3.7.3 on a MacOS 11.4 and getting the following error:
Defaulting to user installation because normal site-packages is not writeable
Collecting spidev
Using cached spidev-3.5.tar.gz (10 kB)
Building wheels for collected packages: spidev
Building wheel for spidev (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/setup.py'"'"'; __file__='"'"'/private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/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/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-wheel-df05b117
cwd: /private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
xcrun -sdk macosx clang -arch x86_64 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m -c spidev_module.c -o build/temp.macosx-10.14-x86_64-3.7/spidev_module.o
spidev_module.c:33:10: fatal error: 'linux/spi/spidev.h' file not found
#include <linux/spi/spidev.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'xcrun' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for spidev
Running setup.py clean for spidev
Failed to build spidev
Installing collected packages: spidev
Running setup.py install for spidev ... error
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/setup.py'"'"'; __file__='"'"'/private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/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/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-record-ivqzy7c8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/wogsland/Library/Python/3.7/include/python3.7m/spidev
cwd: /private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/
Complete output (12 lines):
running install
running build
running build_ext
building 'spidev' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
xcrun -sdk macosx clang -arch x86_64 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m -c spidev_module.c -o build/temp.macosx-10.14-x86_64-3.7/spidev_module.o
spidev_module.c:33:10: fatal error: 'linux/spi/spidev.h' file not found
#include <linux/spi/spidev.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'xcrun' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/setup.py'"'"'; __file__='"'"'/private/var/folders/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-install-u033u0oe/spidev_96f8104add874aca92e572d21798ca0a/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/tf/vd1f171x1cxcgc2sq0ttn_v00000gn/T/pip-record-ivqzy7c8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/wogsland/Library/Python/3.7/include/python3.7m/spidev Check the logs for full command output.
Are there dependencies external to Python which I need to install first?

leptonica/allheaders.h is missing for tesseocr installation on M1 macs with homebrew

i was trying to install normcap for OCR reading of images but i got into an error and don't understand how to solve it.
PC - Macbook M1 chipset
homebrew 3.1.7 installed and working fine.
CommandLinetools 12.5 have been installed(Apple).
Leptonica 1.80.0 is installed.
Tesseract 4.1.1 installed
asura#Asuras-MBP ~ % pip3 install tesserocr
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting tesserocr
Using cached tesserocr-2.5.1.tar.gz (54 kB)
Building wheels for collected packages: tesserocr
Building wheel for tesserocr (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/setup.py'"'"'; __file__='"'"'/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/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/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-wheel-vmhekyq6
cwd: /private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/
Complete output (16 lines):
/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/setup.py:72: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if subversion is not None and subversion is not "":
Supporting tesseract v4.1.1
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 67174656}}
running bdist_wheel
running build
running build_ext
building 'tesserocr' extension
creating build
creating build/temp.macosx-10.14.6-arm64-3.8
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c tesserocr.cpp -o build/temp.macosx-10.14.6-arm64-3.8/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
tesserocr.cpp:663:10: fatal error: 'leptonica/allheaders.h' file not found
#include "leptonica/allheaders.h"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for tesserocr
Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
Running setup.py install for tesserocr ... error
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/setup.py'"'"'; __file__='"'"'/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/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/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-record-qagqxk6s/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/asura/Library/Python/3.8/include/python3.8/tesserocr
cwd: /private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/
Complete output (16 lines):
/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/setup.py:72: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if subversion is not None and subversion is not "":
Supporting tesseract v4.1.1
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 67174656}}
running install
running build
running build_ext
building 'tesserocr' extension
creating build
creating build/temp.macosx-10.14.6-arm64-3.8
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c tesserocr.cpp -o build/temp.macosx-10.14.6-arm64-3.8/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
tesserocr.cpp:663:10: fatal error: 'leptonica/allheaders.h' file not found
#include "leptonica/allheaders.h"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/setup.py'"'"'; __file__='"'"'/private/var/folders/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-install-44_kap26/tesserocr_10c3c6f9825d4363b69446dbd439cf21/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/w4/n1pwmphn6j13trrwzlzjbpzh0000gn/T/pip-record-qagqxk6s/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/asura/Library/Python/3.8/include/python3.8/tesserocr Check the logs for full command output.
As per my knowledge i provided all the information needed if something is missing please let me know.
i'm new to homebrew but used linux OS's for sometime
and also is there a way i can install from Github or any repository directly on homebrew, like if some changes are made in git repository files i want to install them directly otherwise need to wait for realese of tar.gz or .dmg files
Include address should be: /opt/homebrew/Cellar/leptonica/1.82.0/include instead of /opt/homebrew/Cellar/leptonica/1.82.0/include/leptonica. If you can add the first path to your PATH variable it might work.
I had the same issue when I was running C++ code, I included the right path and the program found leptonics/allheader.h file.

Unable to install PyAudio in Python 3.9 (Windows, Ubuntu)

I'm trying to install PyAudio on Python 3.9. I am running Windows 10 and using an Ubuntu bash. I've tried both pip3 install and pip3 install pyasn‑1.6.0b1‑cp39‑cp39‑win_amd64.whl. The second being an attempt to use the unofficial 3.9 wheel from here.
This is what I get when I attempt pip3 install pyaudio:
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-imufkwd7/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-imufkwd7/pyaudio/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-c2o57hhw
cwd: /tmp/pip-install-imufkwd7/pyaudio/
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying src/pyaudio.py -> build/lib.linux-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/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 -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
29 | #include "portaudio.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-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: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-imufkwd7/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-imufkwd7/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 /tmp/pip-record-8vw48w5x/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/lukangel00/.local/include/python3.8/pyaudio
cwd: /tmp/pip-install-imufkwd7/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying src/pyaudio.py -> build/lib.linux-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/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 -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
29 | #include "portaudio.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-imufkwd7/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-imufkwd7/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 /tmp/pip-record-8vw48w5x/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/lukangel00/.local/include/python3.8/pyaudio Check the logs for full command output.
In the error message, I'm noticing a reference to Python 3.8, which I don't have. Is this part of the error?
And this is what I get when I attempt pip3 install pyasn‑1.6.0b1‑cp39‑cp39‑win_amd64.whl:
ERROR: PyAudio-0.2.11-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.
I've checked, and I'm certain that I have x64 Python. I also tried a different version in case this one was buggy.
Any ideas?
Try installing python-dev
sudo apt-get install python-dev
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
try the above snippet before running
pip install pyaudio
it worked for me
here are some sources I took this info in case you need it:
https://www.codegrepper.com/code-examples/python/how+to+install+pyaudio+in+ubuntu
https://ourcodeworld.com/articles/read/974/how-to-solve-installation-error-of-pyaudio-in-ubuntu-18-04-fatal-error-portaudio-h-file-not-found

pyaudio installation error ( #include <stdio.h> command 'clang' failed with exit status 1)

I'm trying to install pyaudio in mac having python 64 bit, using the command "pip3 install pyaudio", by getting the below error.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/bin/python3' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/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/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-record-0v8uniq2/install-record.txt --single-version-externally-managed --compile --install-headers '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/include/site/python3.7/pyaudio'
cwd: /private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.7
copying src/pyaudio.py -> build/lib.macosx-10.15-x86_64-3.7
running build_ext
building '_portaudio' extension
creating build/temp.macosx-10.15-x86_64-3.7
creating build/temp.macosx-10.15-x86_64-3.7/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/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DMACOSX=1 -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_portaudiomodule.c -o build/temp.macosx-10.15-x86_64-3.7/src/_portaudiomodule.o
src/_portaudiomodule.c:27:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/bin/python3' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-install-sq4k9xkw/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/kr/jr2wrc015pz1clvbqvwr1lhh0000gn/T/pip-record-0v8uniq2/install-record.txt --single-version-externally-managed --compile --install-headers '/Users/sambitkumar/Documents/Learn/Python Packages/speech/venv/include/site/python3.7/pyaudio' Check the logs for full command output.
I tried the below solutions but none of them could help me in installing the package successfully.
brew install portaudio (It's already installed)
pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio (same error as mentioned above)
xcode-select --install (It fails saying this is either already installed or not required any more.)
Any suggestion to install the package successfully?

Getting Errors while installing airflow using pip install apache-airflow in macOS Catalina

I am steering my learning wheel towards airflow during this weekend and while setting up and installing airflow at local machine using pip install apache-airflow, I'm getting following errors:
(base) ItGuy-MacBook-Pro:~ gofrogs$ pip install apache-airflow
Stored in directory: /Users/gofrogs/Library/Caches/pip/wheels/41/d4/fa/31df9cc56ee41572a4dfc1be7dfc87df59a5d6a7fd03e97eab
Building wheel for setproctitle (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/gofrogs/Downloads/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/setup.py'"'"'; __file__='"'"'/private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/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 /private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-wheel-78zrb1fy
cwd: /private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/
Complete output (10 lines):
running bdist_wheel
running build
running build_ext
building 'setproctitle' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/gofrogs/Downloads/anaconda3/include -arch x86_64 -I/Users/gofrogs/Downloads/anaconda3/include -arch x86_64 -DSPT_VERSION=1.1.10 -D__darwin__=1 -I/Users/gofrogs/Downloads/anaconda3/include/python3.7m -c src/setproctitle.c -o build/temp.macosx-10.9-x86_64-3.7/src/setproctitle.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for setproctitle
and
Successfully built thrift flask-admin termcolor alembic dill pendulum flask-login flask-swagger json-merge-patch tzlocal Flask-JWT-Extended sqlalchemy-utils Flask-OpenID
Failed to build setproctitle
Installing collected packages: thrift, flask-caching, cached-property, wtforms, flask-admin, lockfile, python-daemon, tabulate, configparser, markdown, sqlalchemy-jsonfield, text-unidecode, termcolor, python-editor, Mako, alembic, dill, attrs, pytzdata, tzlocal, pendulum, argcomplete, setproctitle, PyJWT, Flask-JWT-Extended, marshmallow, flask-wtf, Flask-Babel, marshmallow-enum, Flask-SQLAlchemy, prison, flask-login, sqlalchemy-utils, apispec, marshmallow-sqlalchemy, python3-openid, Flask-OpenID, flask-appbuilder, cattrs, colorlog, graphviz, typing-extensions, croniter, flask-swagger, iso8601, tenacity, funcsigs, json-merge-patch, zope.deprecation, gunicorn, apache-airflow
Attempting uninstall: attrs
Found existing installation: attrs 19.2.0
Uninstalling attrs-19.2.0:
Successfully uninstalled attrs-19.2.0
Running setup.py install for setproctitle ... error
ERROR: Command errored out with exit status 1:
command: /Users/gofrogs/Downloads/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/setup.py'"'"'; __file__='"'"'/private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/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/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-record-cl1apnxt/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gofrogs/Downloads/anaconda3/include/python3.7m/setproctitle
cwd: /private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/
Complete output (10 lines):
running install
running build
running build_ext
building 'setproctitle' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/gofrogs/Downloads/anaconda3/include -arch x86_64 -I/Users/gofrogs/Downloads/anaconda3/include -arch x86_64 -DSPT_VERSION=1.1.10 -D__darwin__=1 -I/Users/gofrogs/Downloads/anaconda3/include/python3.7m -c src/setproctitle.c -o build/temp.macosx-10.9-x86_64-3.7/src/setproctitle.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/gofrogs/Downloads/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/setup.py'"'"'; __file__='"'"'/private/var/folders/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-install-hnedol5a/setproctitle/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/7s/9jm62xrs77x3mvsjfkd_7fq80000gn/T/pip-record-cl1apnxt/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gofrogs/Downloads/anaconda3/include/python3.7m/setproctitle Check the logs for full command output.
Could you please suggest me what needs to be fixed? Also, if possible please share link(s) to detailed explanation/tutorials about airflow so I/future readers can follow the best resources?
Your issue is typically related to Xcode toolkit.
Type this command in your terminal
xcode-select --install
If that doesn't work, you can always try to update the toolkit first.

Resources