question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation fails on OSX 10.11.2

See original GitHub issue

Hi, I’ve been trying to install pyodbc on OSX 10.11.2. It’s python 3.5 in virtualenv. Here’s the output:

➜  ~  pip install pyodbc
Collecting pyodbc
  Using cached pyodbc-3.0.10.tar.gz
Building wheels for collected packages: pyodbc
  Running setup.py bdist_wheel for pyodbc ... error
  Complete output from command /Users/rafal/.virtualenvs/safari/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/tmplqchxhagpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_ext
  building 'pyodbc' extension
  creating build
  creating build/temp.macosx-10.10-x86_64-3.5
  creating build/temp.macosx-10.10-x86_64-3.5/private
  creating build/temp.macosx-10.10-x86_64-3.5/private/var
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc
  creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-error=unused-command-line-argument-hard-error-in-future -DPYODBC_VERSION=3.0.10 -DPYODBC_UNICODE_WIDTH=4 -UMAC_OS_X_VERSION_10_7 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/buffer.cpp -o build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
  warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
  In file included from /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/buffer.cpp:12:
  /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/pyodbc.h:52:10: fatal error: 'sql.h' file not found
  #include <sql.h>
           ^
  1 warning and 1 error generated.
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyodbc
  Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc
  Running setup.py install for pyodbc ... error
    Complete output from command /Users/rafal/.virtualenvs/safari/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-r3c1ck3z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafal/.virtualenvs/safari/bin/../include/site/python3.5/pyodbc:
    running install
    running build
    running build_ext
    building 'pyodbc' extension
    creating build
    creating build/temp.macosx-10.10-x86_64-3.5
    creating build/temp.macosx-10.10-x86_64-3.5/private
    creating build/temp.macosx-10.10-x86_64-3.5/private/var
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc
    creating build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-error=unused-command-line-argument-hard-error-in-future -DPYODBC_VERSION=3.0.10 -DPYODBC_UNICODE_WIDTH=4 -UMAC_OS_X_VERSION_10_7 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/buffer.cpp -o build/temp.macosx-10.10-x86_64-3.5/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
    warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
    In file included from /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/buffer.cpp:12:
    /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/src/pyodbc.h:52:10: fatal error: 'sql.h' file not found
    #include <sql.h>
             ^
    1 warning and 1 error generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/rafal/.virtualenvs/safari/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-r3c1ck3z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafal/.virtualenvs/safari/bin/../include/site/python3.5/pyodbc" failed with error code 1 in /private/var/folders/pt/t2v9lzls6xl_27skkvwcvsvh0000gn/T/pip-build-5k1e4xxe/pyodbc

I have unixodbc installed:

➜  /usr  sudo find . -name 'sql.h'
Password:
./local/Cellar/unixodbc/2.3.2_1/include/sql.h
./local/include/sql.h

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

33reactions
ghostcommented, Jun 19, 2017

If you have Homebrew, just install the ODBC headers:

$ brew install unixodbc

and run “pip install pyodbc” again.

0reactions
mkleehammercommented, Jul 8, 2017

I agree with brew install, but I intended for the Python 2.7 binary wheel to install on El Capitan. I notice that all of the filenames have “macos_10_6” except for the Python 2.7 which says “macos_10_13”. They literally use the same setup.py file - does anyone know why it does that? I haven’t had time too look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with OS X 10.11.2 update... - Apple Community
Hello. I'm on a MacBook Air - 2014 model with OS X 10.11.2. After installing this update I noticed some... well, let's cll...
Read more >
9 Ways to Fix an Error Occurred While Preparing the Installation
Fix 1: Restart your Mac · Fix 2: Check the Date and Time · Fix 3: Boot Into Safe Mode · Fix 4:...
Read more >
El Capitan: No packages were eligible for install-Fix - YouTube
Please watch version 2 of this video here: https://www.youtube.com/watch?v=cOIU-JVpTxcFixes the " install failed " and "No packages were ...
Read more >
Fixing Mac OS X Install Errors “can't be verified ... - OSXDaily
It may have been corrupted or tampered with during downloading” message, or a more vague “An error occurred while preparing the installation.
Read more >
Mac Installation Errors You May Encounter and How to Fix Them
It may seem odd but the usual cause is a corrupt installer, and simply deleting the installer app and downloading a new copy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found