I am installing cffi package for cryptography and Jasmin installation.
I did some research before posting question, so I found following option but which is seems not working:
System
Mac OSx 10.9.5
python2.7
Error
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 warning and 1 error generated.
Please guide me on following issue.
Thanks
Command
env DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib/ ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" sudo -E pip install cffi
LOG
bhushanvaiude$ env DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib/ ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" sudo -E pip install cffi
Password:
Downloading/unpacking cffi
Downloading cffi-0.8.6.tar.gz (196kB): 196kB downloaded
Running setup.py egg_info for package cffi
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
1 warning generated.
Downloading/unpacking pycparser (from cffi)
Downloading pycparser-2.10.tar.gz (206kB): 206kB downloaded
Running setup.py egg_info for package pycparser
Installing collected packages: cffi, pycparser
Running setup.py install for cffi
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
1 warning generated.
building '_cffi_backend' extension
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Qunused-arguments -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -DUSE__THREAD -I##HOMEBREW_CELLAR##/libffi/3.0.13/lib/libffi-3.0.13/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.9-intel-2.7/c/_cffi_backend.o
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 warning and 1 error generated.
error: command 'cc' failed with exit status 1
Complete output from command /Users/****project path***/bin/python -c "import setuptools;__file__='/Users/****project path***/build/cffi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/7w/8z_mn3g120n34bv0w780gnd00000gn/T/pip-e6d6Ay-record/install-record.txt --single-version-externally-managed --install-headers /Users/****project path***/include/site/python2.7:
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
1 warning generated.
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/__init__.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/api.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/cparser.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/gc_weakref.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/lock.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/model.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/verifier.py -> build/lib.macosx-10.9-intel-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/c
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Qunused-arguments -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -DUSE__THREAD -I##HOMEBREW_CELLAR##/libffi/3.0.13/lib/libffi-3.0.13/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.9-intel-2.7/c/_cffi_backend.o
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 warning and 1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
In your terminal try and run:
xcode-select --install
After that try installing the package again.
By default, XCode installs itself as the IDE and does not set up the environment for the use by command line tools; for example, the /usr/include folder will be missing.
Running the above command will install the tools necessary to run compilation from the command line and create the required symbolic links. Since Python packages compile native code parts using the command-line interface of XCode, this step is required to install Python packages that include native components.
You only need to do this once per XCode install/upgrade, or if you see a similar error.
Install CLI development toolchain with
$ xcode-select --install
If you have a broken pkg-config, unlink it with following command as mentioned in comments.
$ brew unlink pkg-config
Install libffi package
$ brew install pkg-config libffi
and then install cffi
$ pip install cffi
Source: Error installing bcrypt with pip on OS X: can't find ffi.h (libffi is installed)
Running the below command in terminal took care of my issue.
xcode-select --install
Related
I wanted to install the module xlwings, and one of its dependencies is appscript. So when I do:
pip3.6 install xlwings
I get the following error:
Collecting xlwings
Using cached https://files.pythonhosted.org/packages/f6/cf/c4e5ba995c6440fff3f6e846ba0aa92481d8d5c54c27860a324df525802b/xlwings-0.15.1.tar.gz
Requirement already satisfied: psutil>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from xlwings) (5.4.8)
Collecting appscript>=1.0.1 (from xlwings)
Using cached https://files.pythonhosted.org/packages/35/0b/0ad06b376b2119c6c02a6d214070c8528081ed868bf82853d4758bf942eb/appscript-1.0.1.tar.gz
Installing collected packages: appscript, xlwings
Running setup.py install for appscript ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-install-t_le314z/appscript/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/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-record-7kas7ahn/install-record.txt --single-version-externally-managed --compile:
running install
Distribution option extra_path is deprecated. See issue27919 for details.
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
copying appscript_3x/lib/mactypes.py -> build/lib.macosx-10.6-intel-3.6
copying appscript_3x/lib/osax.py -> build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemsend.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/findapp.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemconnect.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/typewrappers.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/__init__.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/kae.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemreference.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemcodecs.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/mactypes.py -> build/lib.macosx-10.6-intel-3.6/aem
creating build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/keywordwrapper.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/__init__.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/referencerenderer.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/terminologyparser.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/reservedkeywords.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/reference.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/defaultterminology.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/terminology.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/genericreference.py -> build/lib.macosx-10.6-intel-3.6/appscript
running build_ext
building 'aem.ae' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/appscript_3x
creating build/temp.macosx-10.6-intel-3.6/appscript_3x/ext
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c appscript_3x/ext/ae.c -o build/temp.macosx-10.6-intel-3.6/appscript_3x/ext/ae.o -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4
In file included from appscript_3x/ext/ae.c:15:
In file included from appscript_3x/ext/ae.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:34:10: fatal error: 'CarbonSound/CarbonSound.h' file not found
#include <CarbonSound/CarbonSound.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-install-t_le314z/appscript/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/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-record-7kas7ahn/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-install-t_le314z/appscript/
I'm using Jupyter Notebook, and the notebook is running Python 3.6 so I want to specifically install appscript and xlwings on 3.6.
My OS is macOS Mojave 10.14.1.
The error code says the problem is with clang, so here is my clang version:
$clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Can anyone possibly shed some light please? ðŸ˜
Update:
the appscript package is now available as binary wheels from pypi. Simply do pip install appscript or pip install xlwings again.
Previous answer:
Make sure you have the XCode command line tools installed when installing with pip as pointed out on http://docs.xlwings.org/en/stable/installation.html#dependencies
If you want things to be easier, use the Anaconda distribution: It does not require the XCode command line tools.
I have installed tools via xcode-select --install but still show the following error while doing pip install MySQL-python
Building wheels for collected packages: MySQL-python
Running setup.py bdist_wheel for MySQL-python ... error
Complete output from command /Users/vaibhavmule/Envs/switchidea/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-install-SD9Cgh/MySQL-python/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/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-wheel-g6C50k --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.13-x86_64-2.7
creating build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.13-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/Cellar/mysql/8.0.11/include/mysql -I/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.13-x86_64-2.7/_mysql.o
_mysql.c:36:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for MySQL-python
Running setup.py clean for MySQL-python
Failed to build MySQL-python
django-model-utils 3.0.0 has requirement Django>=1.8, but you'll have django 1.6.7 which is incompatible.
faker 0.8.16 has requirement six>=1.10, but you'll have six 1.6.1 which is incompatible.
django-phonenumber-field 2.0.0 has requirement Django>=1.11, but you'll have django 1.6.7 which is incompatible.
Installing collected packages: MySQL-python, opbeat, olefile, Pillow, pyzmq, contextlib2, raven, simplejson, South, sqlparse, wheel, django-sendfile, httplib2, pytz, twilio, phonenumberslite, babel, django-phonenumber-field, django-twilio, text-unidecode, python-dateutil, Faker, factory-boy, waitress, beautifulsoup4, WebOb, webtest, django-webtest, coverage
Running setup.py install for MySQL-python ... error
Complete output from command /Users/vaibhavmule/Envs/switchidea/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-install-SD9Cgh/MySQL-python/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/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-record-ihy3we/install-record.txt --single-version-externally-managed --compile --install-headers /Users/vaibhavmule/Envs/switchidea/bin/../include/site/python2.7/MySQL-python:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.13-x86_64-2.7
creating build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.13-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.13-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/Cellar/mysql/8.0.11/include/mysql -I/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.13-x86_64-2.7/_mysql.o
_mysql.c:36:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/Users/vaibhavmule/Envs/switchidea/bin/python2.7 -u -c "import
setuptools, tokenize;__file__='/private/var/folders/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-install-SD9Cgh/MySQL-python/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/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-record-ihy3we/install-record.txt --single-version-externally-managed --compile --install-headers /Users/vaibhavmule/Envs/switchidea/bin/../include/site/python2.7/MySQL-python" failed with error code 1 in /private/var/folders/p6/0v0bflxn3t399_qdpnm2z7hc0000gn/T/pip-install-SD9Cgh/MySQL-python/
I just resolved this exact issue when running Ansible's mysql_user module. The answer here helped tip me off to a solution. I also needed MySQL-python from pip, which also broke in this process, so I've added the extra steps.
Steps to resolve:
brew unlink mysql # only if installed, causes the next step to fail
brew install mysql-connector-c
locate mysql_config file with which (mysql_config)
edit the mysql_config file, under # Create options change this:
libs="$libs -l "
to this:
libs="$libs -lmysqlclient -lssl -lcrypto"
if using vim, :wq! to save the read-only file
Now the install should run successfully
pip install mysqlclient
Adding this separately, as it's similar but not directly related to the initial question
pip install MySQL-python
Fix mysql brew formula, if it was unlinked in the first step.
brew unlink mysql-connector-c
brew link mysql
I fixed it by passing the OpenSSL path:
env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install mysqlclient
You can see the full article of the solution done by MrWeeble
I solved this issue by setting xcode-select to use non-XCode command line tools, as shown in the below answer. I had a related clang error which led me to this answer.
sudo xcode-select --switch /Library/Developer/CommandLineTools
https://stackoverflow.com/a/30902106/11614142
I know maybe the former answers can solve the problem already. But I'm still sharing below solution. If you don't want to brew install any extra things, you can try this solution.
I think the issue happens in many situations, mainly related to the installation of the pip packages about MySQL. In my case, I bumped into this issue when trying to install mysqlclient for Django.
This solution should work when you've installed MySQL with dmg downloaded from their official site.
In that case, you may find mysql_config in /usr/local/mysql/bin
If so, add export PATH="/usr/local/mysql/bin:${PATH}" in ~/.bash_profile, this would add the bin folder of mysql into the PATH, or you can say environment variable. Please note that mysql maybe in detail with your mysql version. In my case, the path is /usr/local/mysql-8.0.12-macos10.13-x86_64/bin.
Save and close the file, then source ~/.bash_profile to enable the change.
Try to install the pip package about MySQL again.
If still not working, a restart is preferred.
None of these answers are really needed in that length. As Vishal noted it is as easy as
brew install openssl
LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient
Then go back to install your pip install -r requirements.txt
So first what is clang? it is a "compiler frontend" for C, C++. What is a compiler frontend you may ask? See this answer for more details. You're trying to install a library (mysqlclient or apache-airflow[mysql] or any other) that requires some C++ dependency to be found but is not, hence the message that looks like:
#include "my_config.h"
^~~~~~~~~~~~~
The clang error messages are pretty verbose so you might miss the important information. What's important are those 3 lines:
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
Find that first line before "command 'clang' failed", this will tell you what library was not found.
If the library was not found, it could be because it's not installed (hence all the brew install ... answers here) or because it's not found in the path (hence all the export LDFLAGS=... and export LIBRARY_PATH=... answers).
In my case, 2 librairies were not found but both were installed, so I solved it with:
export LDFLAGS="-L/usr/local/Cellar/openssl#1.1/1.1.1l/lib -L/usr/local/Cellar/zstd/1.5.0/lib"
pip install 'apache-airflow[mysql]'
This is not a direct answer to OP, but hopefully helpful in some way.
I tried this,
export ARCHFLAGS="-arch x86_64"
Then re-execute the installation command. It's resolved for me.
Following did the trick for me, Using mac.
brew install leveldb gmp pkg-config
After this just run
pip3 install MySQL-python
I am building a django app and for which i need to configure mysql.I am trying to install mysqlclient module for sql connection and this is what i am trying
pip install mysqlclient --no-cache-dir
It is throwing me following error.It is throwing error while linking to gcc library.
Collecting mysqlclient
Downloading mysqlclient-1.3.12.tar.gz (89kB)
100% |################################| 92kB 4.0MB/s
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command /home/admin/awx.varadev.com/awxenv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6m2TNP/mysqlclient/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-WFoARo-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/admin/awx.varadev.com/awxenv/include/site/python2.7/mysqlclient:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from /usr/include/python2.7/pyconfig.h:6:0,
from /usr/include/python2.7/Python.h:8,
from _mysql.c:32:
/usr/include/python2.7/pyconfig-64.h:1188:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
#define _POSIX_C_SOURCE 200112L
^
In file included from /usr/include/sys/types.h:25:0,
from /usr/include/mysql/mysql.h:38,
from _mysql.c:29:
/usr/include/features.h:168:0: note: this is the location of the previous definition
# define _POSIX_C_SOURCE 200809L
^
In file included from /usr/include/python2.7/pyconfig.h:6:0,
from /usr/include/python2.7/Python.h:8,
from _mysql.c:32:
/usr/include/python2.7/pyconfig-64.h:1210:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
#define _XOPEN_SOURCE 600
^
In file included from /usr/include/sys/types.h:25:0,
from /usr/include/mysql/mysql.h:38,
from _mysql.c:29:
/usr/include/features.h:170:0: note: this is the location of the previous definition
# define _XOPEN_SOURCE 700
^
gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib64 -L/usr/lib64 -lmariadb -lpthread -lz -ldl -lm -lssl -lcrypto -lpython2.7 -o build/lib.linux-x86_64-2.7/_mysql.so
/usr/bin/ld: cannot find -lmariadb
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/admin/awx.varadev.com/awxenv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6m2TNP/mysqlclient/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-WFoARo-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/admin/awx.varadev.com/awxenv/include/site/python2.7/mysqlclient" failed with error code 1 in /tmp/pip-build-6m2TNP/mysqlclient/
is this gcc default feature to link a library file for mysql? I have googled on this and it showing that gcc needs as .so file which i need to symlink with some location.I am running mariadb 10.9 on my server and i did not find any such file in my system.
Solved in CentOS 7 + MariaDB 10.2
I'm having same issue, and I would like to contribute with my answer. I've just installed in my 2 servers running CentOS 7 with MariaDB (10.2.14-MariaDB MariaDB Server)
.
$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
$ mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is XXXX
Server version: 10.2.14-MariaDB MariaDB Server
I've installed MariaDB, this packages:
$ yum list installed | grep mariadb
MariaDB-client.x86_64 10.3.13-1.el7.centos #mariadb
MariaDB-common.x86_64 10.3.13-1.el7.centos #mariadb
MariaDB-compat.x86_64 10.3.13-1.el7.centos #mariadb
MariaDB-server.x86_64 10.3.13-1.el7.centos #mariadb
galera.x86_64 25.3.25-1.rhel7.el7.centos #mariadb
I found that the problem is that mysqlclient requires mysql-devel packages, which is different from mariadb-devel. Don't install mariadb-devel!
So, to install only mysql-devel, you need to:
1. Remove any MariaDB-devel
$ sudo yum erase MariaDB-devel.x86_64
2. Add MySQL repository in yum
Go to https://dev.mysql.com/downloads/repo/yum/ and select the RPM file for your CentOS (for me, I choose "Red Hat Enterprise Linux 7 / Oracle Linux 7 (Architecture Independent), RPM Package". Click "download".)
Download without registration, copy bottom link "No thanks, just start my download".
Go to your terminal and type:
$ wget link-to-rpm-you-choose
After download complete, type:
$ sudo rpm -Uvh your-rpm-downloaded
3. Now, install mysql-devel
Type (this is my version, watch yours):
$ sudo yum install mysql-community-devel.x86_64
4. Now, finally: mysqlclient
Type:
$ sudo pip install mysqlclient
Collecting mysqlclient
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz (85kB)
100% |████████████████████████████████| 92kB 758kB/s
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... done
Successfully installed mysqlclient-1.4.2.post1
You are using pip version 8.1.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
And that's it! It worked like a charm and now I can use Python + Django + MariaDB/MySQL
Oh, and mysqlclient is the connector recommended by Django. See: https://docs.djangoproject.com/en/2.1/ref/databases/#mysql-db-api-drivers
Good luck and see ya! :-)
I found this solution at https://github.com/r-dbi/RMySQL/issues/197:
The MariaDB-devel-10.2.6-1.fc25.x86_64 package contains only a library named:
/usr/lib64/libmariadbclient.a
However their pkg-config yields another name:
> pkg-config --libs mariadb
-lmariadb
A workaround is to symlink libmariadbclient.a to libmariadb.a:
sudo ln -s /usr/lib64/libmariadbclient.a /usr/lib64/libmariadb.a
Basically to have mysqlclient install in Python 3.6 and CentOS 7 you need to run:
sudo yum install -y python36-devel mysql-devel gcc
sudo ln -s /usr/lib64/libmariadbclient.a /usr/lib64/libmariadb.a
pip install mysqlclient
It's complaining about not being able to find mariadb libs. Run the following to find out why:
ld -lmariadb --verbose
This should tell you specifically what gcc is missing.
My guess is that you are missing some MySQL development headers. Install them with:
debian / ubuntu: sudo apt-get install python-dev libmysqlclient-dev
redhat / centos: sudo yum install python-devel mysql-devel
Update: It really is missing MariaDB shared libs. I think on CentOS, this should take care of it:
sudo yum install MariaDB-devel
Final Update: Just use PyMySQL - pure python, no headers required, no need to jump through these kinds of hoops.
The simplest solution that worked for me is:
yum install python-devel mysql-devel
Then install mysqlclient using pip
pip install mysqlclient
Open the terminal or login to the workstation/laptop/dev-server using ssh client. Type the following command yum command as a root user:
# yum install mysql
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.wiredtree.com
* extras: mirrors.serveraxis.net
* updates: bay.uchicago.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.71-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql x86_64 5.1.71-1.el6 base 893 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 893 k
Installed size: 2.4 M
Is this ok [y/N]: y
Downloading Packages:
mysql-5.1.71-1.el6.x86_64.rpm | 893 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysql-5.1.71-1.el6.x86_64 1/1
Verifying : mysql-5.1.71-1.el6.x86_64 1/1
Installed:
mysql.x86_64 0:5.1.71-1.el6
Complete!
mysql client the basic syntax is:
mysql -u USER-NAME-HERE -h MYSQL-DB-SERVER-IP-ADDRESS-HERE -p DB-NAME
mysql -u nixcraft -h server1.cyberciti.biz -p salesdata
I am installing cffi package for cryptography and Jasmin installation.
I did some research before posting question, so I found following option but which is seems not working:
System
Mac OSx 10.9.5
python2.7
Error
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 warning and 1 error generated.
Please guide me on following issue.
Thanks
Command
env DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib/ ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" sudo -E pip install cffi
LOG
bhushanvaiude$ env DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib/ ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" sudo -E pip install cffi
Password:
Downloading/unpacking cffi
Downloading cffi-0.8.6.tar.gz (196kB): 196kB downloaded
Running setup.py egg_info for package cffi
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
1 warning generated.
Downloading/unpacking pycparser (from cffi)
Downloading pycparser-2.10.tar.gz (206kB): 206kB downloaded
Running setup.py egg_info for package pycparser
Installing collected packages: cffi, pycparser
Running setup.py install for cffi
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
1 warning generated.
building '_cffi_backend' extension
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Qunused-arguments -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -DUSE__THREAD -I##HOMEBREW_CELLAR##/libffi/3.0.13/lib/libffi-3.0.13/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.9-intel-2.7/c/_cffi_backend.o
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 warning and 1 error generated.
error: command 'cc' failed with exit status 1
Complete output from command /Users/****project path***/bin/python -c "import setuptools;__file__='/Users/****project path***/build/cffi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/7w/8z_mn3g120n34bv0w780gnd00000gn/T/pip-e6d6Ay-record/install-record.txt --single-version-externally-managed --install-headers /Users/****project path***/include/site/python2.7:
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
1 warning generated.
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/__init__.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/api.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/cparser.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/gc_weakref.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/lock.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/model.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.9-intel-2.7/cffi
copying cffi/verifier.py -> build/lib.macosx-10.9-intel-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/c
cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Qunused-arguments -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -DUSE__THREAD -I##HOMEBREW_CELLAR##/libffi/3.0.13/lib/libffi-3.0.13/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.9-intel-2.7/c/_cffi_backend.o
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 warning and 1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
In your terminal try and run:
xcode-select --install
After that try installing the package again.
By default, XCode installs itself as the IDE and does not set up the environment for the use by command line tools; for example, the /usr/include folder will be missing.
Running the above command will install the tools necessary to run compilation from the command line and create the required symbolic links. Since Python packages compile native code parts using the command-line interface of XCode, this step is required to install Python packages that include native components.
You only need to do this once per XCode install/upgrade, or if you see a similar error.
Install CLI development toolchain with
$ xcode-select --install
If you have a broken pkg-config, unlink it with following command as mentioned in comments.
$ brew unlink pkg-config
Install libffi package
$ brew install pkg-config libffi
and then install cffi
$ pip install cffi
Source: Error installing bcrypt with pip on OS X: can't find ffi.h (libffi is installed)
Running the below command in terminal took care of my issue.
xcode-select --install
Like many people, I am having issues getting mysql and python to work together. My specs are:
OSX10.9.2
Anaconda 1.9.1 with python 2.7.2, although 2.5 and 2.6 appear to be included
MySQL 5.6.16
I have written a python script where I try to import MySQLdb, or PyMySQL then MySQLdb, neither works.
I read many of the threads on stack overflow, and as a result I eventually tried
$ export CFLAGS=-Qunused-arguments
$ export CPPFLAGS=-Qunused-arguments
$ pip install mysql-python
The results are below. A fatal error was issued, as can be seen at the bottom of the output.
Downloading/unpacking mysql-python
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/private/var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/T/pip_build_vincent/mysql-python/setup.py) egg_info for package mysql-python
Installing collected packages: mysql-python
Running setup.py install for mysql-python
building '_mysql' extension
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -Dversion_info=(1,2,5,'final',1) -D_version_=1.2.5 -I/usr/local/mysql/include -I/Users/vincentlaufer/anaconda/include/python2.7 -c _mysql.c -o build/temp.macosx-10.5-x86_64-2.7/_mysql.o -Os -g -fno-strict-aliasing -arch x86_64
In file included from _mysql.c:29:
/Users/vincent/anaconda/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
#include
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Complete output from command /Users/vincentlaufer/anaconda/bin/python -c "import setuptools, tokenize;file='/private/var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/T/pip_build_vincent/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/T/pip-6aqGYj-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.5-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.5-x86_64-2.7
creating build/lib.macosx-10.5-x86_64-2.7/MySQLdb
copying MySQLdb/init.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb
creating build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.5-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.5-x86_64-2.7
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -Dversion_info=(1,2,5,'final',1) -D_version_=1.2.5 -I/usr/local/mysql/include -I/Users/vincent/anaconda/include/python2.7 -c _mysql.c -o build/temp.macosx-10.5-x86_64-2.7/_mysql.o -Os -g -fno-strict-aliasing -arch x86_64
In file included from _mysql.c:29:
/Users/vincent/anaconda/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
include stdio.h
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Cleaning up...
Command /Users/vincent/anaconda/bin/python -c "import setuptools, tokenize;file='/private/var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/T/pip_build_vincent/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/T/pip-6aqGYj-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/T/pip_build_vincent/mysql-python
Storing debug log for failure in /Users/vincentlaufer/.pip/pip.log
I would like to thank everyone for the many answers provided that got me this far already, but also to ask if anyone knows how to solve this issue. Thank you!!
Inclusion of the line:
$ xcode-select --install
solves this problem, as per: GCC fatal error: stdio.h: No such file or directory