Failed to install quadprog on Linux Mint 20 - python

has anyone installed this quadprog lib on Python 3.8 and Linux Mint 20? I'm trying to install and the following error is appearing:
pip install quadprog
Collecting quadprog
Using cached quadprog-0.1.8.tar.gz (269 kB)
Requirement already satisfied: Cython in ./anaconda3/lib/python3.8/site-packages (from quadprog) (0.29.21)
Building wheels for collected packages: quadprog
Building wheel for quadprog (setup.py) ... [?25lerror
ERROR: Command errored out with exit status 1:
command: /home/hugosouza/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8o_4txn2/quadprog_089e8c8a9afa4563849d61ace43b3f03/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8o_4txn2/quadprog_089e8c8a9afa4563849d61ace43b3f03/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-r3kgatse
cwd: /tmp/pip-install-8o_4txn2/quadprog_089e8c8a9afa4563849d61ace43b3f03/
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
skipping 'quadprog/quadprog.cpp' Cython extension (up-to-date)
building 'quadprog' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/quadprog
gcc -pthread -B /home/hugosouza/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iquadprog -I/home/hugosouza/anaconda3/include/python3.8 -c quadprog/quadprog.cpp -o build/temp.linux-x86_64-3.8/quadprog/quadprog.o
gcc: fatal error: cannot execute ‘cc1plus’: execvp: Arquivo ou diretório não encontrado
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for quadprog
nning setup.py clean for quadprog
Failed to build quadprog
^C
ERROR: Operation cancelled by user
Note: you may need to restart the kernel to use updated packages.

You need to install g++ or build-essential (which will install g++)
apt-get install g++

Related

Failed to Deploy to Heroku Platform

I am creating a html web form, from which I want the data to be stored into the local machine. While running the program it works fine on my local machine.
When I push the program to Heroku platform it fails.
----main file
-------Procfile
-------requirements.txt
-------runtime.txt
-------main.py
-------static
----templates
------index.html
----static
------index_css.css
Procfile:
web: gunicorn main:app
Requirements:
flask==1.1.1
flask-mysqldb==0.2.0
gunicorn==19.9.0
pyodbc==4.0.30
Runtime:
python-3.7.2
Error While Deploying it on Heroku PLatform:
Building wheel for pyodbc (setup.py): started
Building wheel for pyodbc (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q2igx1jr/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q2igx1jr/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-8r1wqs6z
cwd: /tmp/pip-install-q2igx1jr/pyodbc/
Complete output (16 lines):
/app/.heroku/python/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0.30 -I/app/.heroku/python/include/python3.7m -c src/buffer.cpp -o build/temp.linux-x86_64-3.7/src/buffer.o -Wno-write-strings
In file included from src/buffer.cpp:12:0:
src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
#include <sql.h>
^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyodbc
Running setup.py clean for pyodbc
Building wheel for mysqlclient (setup.py): started
Building wheel for mysqlclient (setup.py): finished with status 'done'
Created wheel for mysqlclient: filename=mysqlclient-2.0.0-cp37-cp37m-linux_x86_64.whl size=100868 sha256=ffd0776f2d39a5405cc1ac1465a08f48ee9da558c172105866f17378a6edebbd
Stored in directory: /tmp/pip-ephem-wheel-cache-5xsag9fy/wheels/80/87/ff/4ea9d03e0a265ef3a4a0cdf0cf1e4786c37665c4015b2ece83
Successfully built flask-mysqldb mysqlclient
Failed to build pyodbc
Installing collected packages: Werkzeug, click, itsdangerous, MarkupSafe, Jinja2, flask, mysqlclient, flask-mysqldb, gunicorn, pyodbc
Running setup.py install for pyodbc: started
Running setup.py install for pyodbc: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q2igx1jr/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q2igx1jr/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-oz00635z/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.7m/pyodbc
cwd: /tmp/pip-install-q2igx1jr/pyodbc/
Complete output (16 lines):
/app/.heroku/python/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0.30 -I/app/.heroku/python/include/python3.7m -c src/buffer.cpp -o build/temp.linux-x86_64-3.7/src/buffer.o -Wno-write-strings
In file included from src/buffer.cpp:12:0:
src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
#include <sql.h>
^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q2igx1jr/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q2igx1jr/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-oz00635z/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.7m/pyodbc Check the logs for full command output.
Push rejected, failed to compile Python app.
Push failed
I am fairly new to Heroku and I don't know how to solve this error.
in Procfile you can change:
web: gunicorn main.wsgi

OSX HIDAPI install for Python3 (pip3 troubleshooting): High-Sierra

OSX High-Sierra: HIDAPI was successfully installed for python 2.7. Python3 was installed today:
Users-MacBook-Air:~ user$ python3 --version
Python 3.7.5
HIDAPI was reinstalled after the python3 installation:
brew reinstall hidapi
This restored the python script that was working with python2 and restored the barcode scanner script is working with:
sudo python2 test5.py
However attempts to run the script with python3 returns an error:
sudo python3 test5.py
ModuleNotFoundError: No module named 'hid'
An attempt install HIDAPI for python3 via pip3 failed:
pip3 install hidapi
Is it necessary and possible to install HIDAPI with PIP3 for python3?
Suggestions to overcome pip3 errors are appeciated: thank you
Error Messages:
sudo -H pip3 install hidapi returns:
Collecting hidapi
Using cached https://files.pythonhosted.org/packages/c1/86/89df0e8890f96eeb5fb68d4ccb14cb38e2c2d2cfd7601ba972206acd9015/hidapi-0.7.99.post21.tar.gz
Requirement already satisfied: setuptools>=19.0 in /usr/local/lib/python3.7/site-packages (from hidapi) (41.6.0)
Building wheels for collected packages: hidapi
Building wheel for hidapi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9pj9tbky/hidapi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9pj9tbky/hidapi/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/tmp/pip-wheel-sd48aazy --python-tag cp37
cwd: /private/tmp/pip-install-9pj9tbky/hidapi/
Complete output (23 lines):
running bdist_wheel
running build
running build_ext
cythoning hid.pyx to hid.c
/private/tmp/pip-install-9pj9tbky/hidapi/.eggs/Cython-0.29.14-py3.7-macosx-10.13-x86_64.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/tmp/pip-install-9pj9tbky/hidapi/hid.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'hid' extension
creating build
creating build/temp.macosx-10.13-x86_64-3.7
creating build/temp.macosx-10.13-x86_64-3.7/hidapi
creating build/temp.macosx-10.13-x86_64-3.7/hidapi/mac
Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Please check your Xcode installation
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -framework IOKit -framework CoreFoundation -Ihidapi/hidapi -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hid.c -o build/temp.macosx-10.13-x86_64-3.7/hid.o
clang: warning: -framework IOKit: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -framework CoreFoundation: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
In file included from hid.c:4:
/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for hidapi
Running setup.py clean for hidapi
Failed to build hidapi
Installing collected packages: hidapi
Running setup.py install for hidapi ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9pj9tbky/hidapi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9pj9tbky/hidapi/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/tmp/pip-record-qsgmu9xu/install-record.txt --single-version-externally-managed --compile
cwd: /private/tmp/pip-install-9pj9tbky/hidapi/
Complete output (21 lines):
running install
running build
running build_ext
skipping 'hid.c' Cython extension (up-to-date)
building 'hid' extension
creating build
creating build/temp.macosx-10.13-x86_64-3.7
creating build/temp.macosx-10.13-x86_64-3.7/hidapi
creating build/temp.macosx-10.13-x86_64-3.7/hidapi/mac
Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Please check your Xcode installation
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -framework IOKit -framework CoreFoundation -Ihidapi/hidapi -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hid.c -o build/temp.macosx-10.13-x86_64-3.7/hid.o
clang: warning: -framework IOKit: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -framework CoreFoundation: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
In file included from hid.c:4:
/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25: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: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9pj9tbky/hidapi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9pj9tbky/hidapi/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/tmp/pip-record-qsgmu9xu/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
pip3 install hidapi returns:
The first error is:
Building wheel for hidapi (setup.py) ... error
What is causing this error? and how to overcome?
WARNING: The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting hidapi
Downloading https://files.pythonhosted.org/packages/c1/86/89df0e8890f96eeb5fb68d4ccb14cb38e2c2d2cfd7601ba972206acd9015/hidapi-0.7.99.post21.tar.gz (51kB)
|████████████████████████████████| 61kB 2.3MB/s
Requirement already satisfied: setuptools>=19.0 in /usr/local/lib/python3.7/site-packages (from hidapi) (41.6.0)
Building wheels for collected packages: hidapi
Building wheel for hidapi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-7lm8qgnn/hidapi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-7lm8qgnn/hidapi/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/tmp/pip-wheel-f9nrghcu --python-tag cp37
cwd: /private/tmp/pip-install-7lm8qgnn/hidapi/
Complete output (23 lines):
running bdist_wheel
running build
running build_ext
cythoning hid.pyx to hid.c
/private/tmp/pip-install-7lm8qgnn/hidapi/.eggs/Cython-0.29.14-py3.7-macosx-10.13-x86_64.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/tmp/pip-install-7lm8qgnn/hidapi/hid.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'hid' extension
creating build
creating build/temp.macosx-10.13-x86_64-3.7
creating build/temp.macosx-10.13-x86_64-3.7/hidapi
creating build/temp.macosx-10.13-x86_64-3.7/hidapi/mac
Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Please check your Xcode installation
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -framework IOKit -framework CoreFoundation -Ihidapi/hidapi -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hid.c -o build/temp.macosx-10.13-x86_64-3.7/hid.o
clang: warning: -framework IOKit: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -framework CoreFoundation: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
In file included from hid.c:4:
/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for hidapi
Running setup.py clean for hidapi
Failed to build hidapi
Installing collected packages: hidapi
Running setup.py install for hidapi ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-7lm8qgnn/hidapi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-7lm8qgnn/hidapi/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/tmp/pip-record-9hm4q3f6/install-record.txt --single-version-externally-managed --compile
cwd: /private/tmp/pip-install-7lm8qgnn/hidapi/
Complete output (21 lines):
running install
running build
running build_ext
skipping 'hid.c' Cython extension (up-to-date)
building 'hid' extension
creating build
creating build/temp.macosx-10.13-x86_64-3.7
creating build/temp.macosx-10.13-x86_64-3.7/hidapi
creating build/temp.macosx-10.13-x86_64-3.7/hidapi/mac
Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Please check your Xcode installation
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -framework IOKit -framework CoreFoundation -Ihidapi/hidapi -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hid.c -o build/temp.macosx-10.13-x86_64-3.7/hid.o
clang: warning: -framework IOKit: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -framework CoreFoundation: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
In file included from hid.c:4:
/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25: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: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-7lm8qgnn/hidapi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-7lm8qgnn/hidapi/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/tmp/pip-record-9hm4q3f6/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Us
UPDATE
The module:
pip3 install hidapi==0.7.99.post14
indicated several build error but ultimately indicated:
Installing collected packages: Cython, hidapi
Running setup.py install for hidapi ... done
Successfully installed Cython-0.29.14 hidapi-0.7.99.post14
Tested & Verified python3 process HID traffic.
https://github.com/trezor/cython-hidapi/issues/65 This seems to be bug in the software.
Hacky solution in the meanwhile is to get the MacOSX10.14 sdk that is bundled with Xcode 10.
CORRECTIVE ACTION
Install Xcode 10.1 (High-Sierra Compatible) from the Apple website Be sure to install Xcode to /Applications directory. If it is not installed to /Applications move it from /Downloads to /Applications.
The path xcode-select -p should be corrected using
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
The command:
/usr/bin/xcodebuild -version
should return:
Xcode 10.1
Build version 10B61
With Xcode properly in to support pip3:
$ pip3 install hidapi
Collecting hidapi
Using cached https://files.pythonhosted.org/packages/c1/86/89df0e8890f96eeb5fb68d4ccb14cb38e2c2d2cfd7601ba972206acd9015/hidapi-0.7.99.post21.tar.gz
Requirement already satisfied: setuptools>=19.0 in ./env/lib/python3.7/site-packages (from hidapi) (41.2.0)
Installing collected packages: hidapi
Running setup.py install for hidapi ... done
Successfully installed hidapi-0.7.99.post21
If you want a system-wide installation, you need to run pip3 with elevated rights.
sudo -H pip3 install hidapi

Install OpenEXR for python failed

I'm trying to install OpenEXR.
Using :
MacOS 10.14.5
Python 3.6.5
Xcode Version 10.2.1
I tried
pip install openexr
but got the following error:
Collecting openexr
Using cached https://files.pythonhosted.org/packages/7c/c4/76bf884f59d3137847edf8b93aaf40f6257d8315d0064e8b1a606ad80b1b/OpenEXR-1.3.2.tar.gz
Building wheels for collected packages: openexr
Building wheel for openexr (setup.py) ... error
ERROR: Complete output from command /Users/silviojin/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-install-0_bh3qoe/openexr/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/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-wheel-gq2luicr --python-tag cp36:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
copying Imath.py -> build/lib.macosx-10.7-x86_64-3.6
running build_ext
building 'OpenEXR' extension
creating build/temp.macosx-10.7-x86_64-3.6
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/silviojin/anaconda3/include -arch x86_64 -I/Users/silviojin/anaconda3/include -arch x86_64 -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/Users/silviojin/anaconda3/include/python3.6m -c OpenEXR.cpp -o build/temp.macosx-10.7-x86_64-3.6/OpenEXR.o -g -DVERSION="1.3.2"
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from OpenEXR.cpp:36:
In file included from /usr/local/include/OpenEXR/ImathBox.h:65:
In file included from /usr/local/include/OpenEXR/ImathVec.h:46:
In file included from /usr/local/include/OpenEXR/ImathExc.h:47:
/usr/local/include/OpenEXR/IexBaseExc.h:49:10: fatal error: 'string' file not found
#include <string>
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for openexr
Running setup.py clean for openexr
Failed to build openexr
Installing collected packages: openexr
Running setup.py install for openexr ... error
ERROR: Complete output from command /Users/silviojin/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-install-0_bh3qoe/openexr/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/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-record-82it1du_/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
copying Imath.py -> build/lib.macosx-10.7-x86_64-3.6
running build_ext
building 'OpenEXR' extension
creating build/temp.macosx-10.7-x86_64-3.6
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/silviojin/anaconda3/include -arch x86_64 -I/Users/silviojin/anaconda3/include -arch x86_64 -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/Users/silviojin/anaconda3/include/python3.6m -c OpenEXR.cpp -o build/temp.macosx-10.7-x86_64-3.6/OpenEXR.o -g -DVERSION="1.3.2"
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from OpenEXR.cpp:36:
In file included from /usr/local/include/OpenEXR/ImathBox.h:65:
In file included from /usr/local/include/OpenEXR/ImathVec.h:46:
In file included from /usr/local/include/OpenEXR/ImathExc.h:47:
/usr/local/include/OpenEXR/IexBaseExc.h:49:10: fatal error: 'string' file not found
#include <string>
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/Users/silviojin/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-install-0_bh3qoe/openexr/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/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-record-82it1du_/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-install-0_bh3qoe/openexr/
same applies if I try to install other packages like:
https://github.com/jamesbowman/openexrpython
or
pip install pyexr
Then I tried:
brew install openexr
and it installed without errors. But I can't be found when importing in python.
Anyone knows why and how to fix this?
Most installation guide recommend installing via pip but I get the error above. The problem seems that it can't find the stdlibc++?
For me it worked installing OpenEXR via brew first and then directly via git
brew install openexr
pip install git+https://github.com/jamesbowman/openexrpython.git
This solution worked for me:
Create pip env. Mainly, follow https://www.excamera.com/sphinx/articles-openexr.html
sudo port install openexr
Download source code from https://github.com/jamesbowman/openexrpython
cd openexrpython
sudo python setup.py install
cd ..
pip install ./openexrpython

PYTHON2 Failed building wheel PyAudio & PortAudio

I have problem on PyAudio and PortAudio, i want to use speech_recognition so speech_recognition needs PyAudio module and i tried to install but its not working i search almost everything
And im using ParrotOS & Python 2.7.16.
So i tried that;
pip install install clang
apt-get install & apt-get update but thats doesnt work
When i write the console this code;
sudo pip install portaudio
or
sudo pip install PyAudio
its shows me this;
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-934KKj/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-tVvPhL --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-UboFgi/python2.7-2.7.16~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
and more fail messages.
sudo apt-get install portaudio19-dev
pip install pyaudio
and later i install pyaudio :)

Installing hunspell package

I'm looking forward to install the hunspell package using pip, but it throws the following error:
Collecting hunspell
Using cached hunspell-0.4.1.tar.gz
Building wheels for collected packages: hunspell
Running setup.py bdist_wheel for hunspell ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oyfpp3iy/hunspell/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/tmphqvqt4lxpip-wheel- --python-tag cp34:
/root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'hunspell' extension
creating build
creating build/temp.linux-x86_64-3.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
#include <hunspell.h>
^
compilation terminée.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for hunspell
Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
Running setup.py install for hunspell ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oyfpp3iy/hunspell/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-euhsmasb-record/install-record.txt --single-version-externally-managed --compile:
/root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
warnings.warn(msg)
running install
running build
running build_ext
building 'hunspell' extension
creating build
creating build/temp.linux-x86_64-3.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
#include <hunspell.h>
^
compilation terminée.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oyfpp3iy/hunspell/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-euhsmasb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-oyfpp3iy/hunspell/
[root#localhost Bureau]# alias python-devel=python34-devel
[root#localhost Bureau]# pip install hunspell
Collecting hunspell
Using cached hunspell-0.4.1.tar.gz
Building wheels for collected packages: hunspell
Running setup.py bdist_wheel for hunspell ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xpljhkom/hunspell/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/tmptwg_9c8vpip-wheel- --python-tag cp34:
/root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'hunspell' extension
creating build
creating build/temp.linux-x86_64-3.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
#include <hunspell.h>
^
compilation terminée.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for hunspell
Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
Running setup.py install for hunspell ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xpljhkom/hunspell/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-zrlp2go9-record/install-record.txt --single-version-externally-managed --compile:
/root/anaconda3/lib/python3.4/distutils/extension.py:132: UserWarning: Unknown Extension options: 'compile_args', 'macros'
warnings.warn(msg)
running install
running build
running build_ext
building 'hunspell' extension
creating build
creating build/temp.linux-x86_64-3.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/hunspell -I/root/anaconda3/include/python3.4m -c hunspell.c -o build/temp.linux-x86_64-3.4/hunspell.o
hunspell.c:21:22: erreur fatale: hunspell.h : Aucun fichier ou dossier de ce type
#include <hunspell.h>
^
compilation terminée.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xpljhkom/hunspell/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-zrlp2go9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-xpljhkom/hunspell/
And I've heard that installing python3-dev would resolve the problem.
I tried with no succes.
I'm using python 3.4 under CentOS 7.
Can I get some help please ? Thanks in advance.
I just went through this using python3.4 and pip3.4 on Centos7 64-bit. (NB you need both python3.4 and pip3.4)
I eventually got it working via pip3.4, but before this would work, I had to take a few extra steps. The steps I took were:
Install the python3.4 development headers:
sudo yum install python34u-devel.x86_64
Install hunspell and hunspell-devel (needed for hunspell.h and hunspell lib):
sudo yum install hunspell hunspell-devel
In /usr/lib64/, add an extra symlink for the hunspell library:
sudo ln -s libhunspell-1.3.so libhunspell.so
Finally, run the command:
sudo pip3.4 install hunspell
... and this gave me the following output:
... (compiler output deleted) ...
Successfully built hunspell
Installing collected packages: hunspell
Successfully installed hunspell-0.4.1
Try This:
sudo apt install python-dev libhunspell-dev
pip install hunspell
Solution by OP.
I figured it out, I'll share this method here, it may help :)
first you need to install python-devel and
yum install python-devel
yum install hunspell-devel
then corrected your symlink
cd /usr/lib64
sudo ln -s libhunspell-1.3.so.0.0.0 libhunspell.so
ls -l | grep hunspell
Good Luck :)
I am working on MAC OS and this solved the error for me.
Hunspell Installation Steps:
brew install hunspell (installed version 1.7.0_2-1)
brew install pkg-config (0.29.2_3)
ln -s /usr/local/lib/libhunspell-1.7.a /usr/local/lib/libhunspell.a
ln -s /usr/local/Cellar/hunspell/1.7.0_2/lib/libhunspell-1.7.dylib /usr/local/Cellar/hunspell/1.7.0_2/lib/libhunspell.dylib
CFLAGS=$(pkg-config --cflags hunspell) LDFLAGS=$(pkg-config --libs hunspell) pip3 install hunspell

Categories