Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Apple Silicon / M1 builds #846

Closed
vpoirot opened this issue Nov 19, 2020 · 48 comments
Closed

Need Apple Silicon / M1 builds #846

vpoirot opened this issue Nov 19, 2020 · 48 comments

Comments

@vpoirot
Copy link

vpoirot commented Nov 19, 2020

Installation fails on Mac OS 11.0

It seems the binary have not been released yet.

Manual installation fails as well from whl file :

ERROR: pyodbc-4.0.30-cp39-cp39-macosx_10_9_x86_64.whl is not a supported wheel on this platform.

Do you know any workaround?

@tovolkmar
Copy link

I was able to run it under Mac OS 11.0 on a MacBook Air with the new M1 chip.
You need to download the source by yourself and run python setup.py build followed by python setup.py install.

@v-chojas
Copy link
Contributor

That said, the ARM Mac ODBC drivers which you will need are probably still rather uncommon for the time being, given that Apple just released the new M1 Macs recently.

@fonnesbeck
Copy link

fonnesbeck commented Dec 2, 2020

I'm able to install, but running connect fails:

InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')

If I look at drivers(), it also returns an empty list. However, I am able to connect using isql with the data source name as an argument, so it does not appear to be an issue with FreeTDS or unixODBC.

The main departure from the install instructions for me is that I used MacPorts (Homebrew does not work for M1 yet). I wonder if that has anything to do with it (i.e. files being located in /opt). The setup.py script seems to account for this though.

@v-chojas
Copy link
Contributor

v-chojas commented Dec 2, 2020

You can see which unixODBC the pyODBC has linked to, run otool -L on the pyODBC library you get with

import pyodbc.
pyodbc.__file__

@fonnesbeck
Copy link

I'm getting:

otool -L /Users/cfonnesbeck/anaconda3/lib/python3.8/site-packages/pyodbc.cpython-38-darwin.so

/Users/cfonnesbeck/anaconda3/lib/python3.8/site-packages/pyodbc.cpython-38-darwin.so:
	@rpath/libodbc.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	@rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)

@v-chojas
Copy link
Contributor

v-chojas commented Dec 2, 2020

That indicates it will be loaded from whatever happens to be in the rpath when the Python is running, and since that depends on what other libraries it has, it is probably easier to run
find / -name libodbc.2.dylib to show all the occurrences of unixODBC libraries you have; I suspect there is more than one.

@mkleehammer
Copy link
Owner

I'm going to rename this to emphasize the issue is Apple Silicon / M1 compatibility. I have access to an M1 Air (though I'm not sure the wife is going to like that :) ) but I've been waiting because of the Homebrew issue. I'm interested in any feedback people have and suggestions on which DBs can be run natively on the M1 for testing.

@mkleehammer mkleehammer changed the title Installation fails on Mac OS 11.0 Need Apple Silicon / M1 builds Jan 22, 2021
@Bearzooka
Copy link

Just FYI @mkleehammer brew is already working for Apple Silicon, with just a slight change on the PATH.

@marcozanella
Copy link

I was able to run it under Mac OS 11.0 on a MacBook Air with the new M1 chip.
You need to download the source by yourself and run python setup.py build followed by python setup.py install.

Hi, I am having a fatal error: 'sql.h' file not found error. sql.h doesn't look to be part of the package.
pyodbc installs just fine, with brew.

@v-chojas
Copy link
Contributor

v-chojas commented Feb 9, 2021

You need to install unixODBC. Please, read the documentation: https://github.com/mkleehammer/pyodbc/wiki/Building-pyodbc-from-source

@msarm
Copy link

msarm commented Feb 14, 2021

You need to install unixODBC. Please, read the documentation: https://github.com/mkleehammer/pyodbc/wiki/Building-pyodbc-from-source

I don't see any documentation from your link that talks about the installation of unixODBC specific for Apple Silicon/M1 , can you provide exact steps if you were successful?

@marcozanella
Copy link

marcozanella commented Feb 15, 2021 via email

@v-chojas
Copy link
Contributor

#872
#870

@michalpulpan
Copy link

Hi, I have installed unixodbc via brew; and installed correctly. However, when installing pyodbc, I get the following error message, followed by more information, with mention sql.h is not found Collecting pyodbc Using cached pyodbc-4.0.30.tar.gz (266 kB) Building wheels for collected packages: pyodbc Building wheel for pyodbc (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/marcozanella/.pyenv/versions/3.9.1/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-install-05exfppr/pyodbc_64a047783b5647e98f08d3659e1cd34b/setup.py'"'"'; file='"'"'/private/var/folders/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-install-05exfppr/pyodbc_64a047783b5647e98f08d3659e1cd34b/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/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-wheel-de40jc02 cwd: /private/var/folders/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-install-05exfppr/pyodbc_64a047783b5647e98f08d3659e1cd34b/ Complete output (14 lines): running bdist_wheel running build running build_ext building 'pyodbc' extension creating build creating build/temp.macosx-11.2-arm64-3.9 creating build/temp.macosx-11.2-arm64-3.9/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/Users/marcozanella/.pyenv/versions/3.9.1/include/python3.9 -c src/buffer.cpp -o build/temp.macosx-11.2-arm64-3.9/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations In file included from src/buffer.cpp:12: src/pyodbc.h:56:10: fatal error: 'sql.h' file not found #include <sql.h> ^~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1

I managed to solve the src/pyodbc.h:56:10: fatal error: 'sql.h' file not found issue on my M1 (Apple Silicion) MacBook Pro by running:

  1. brew install unixodbc
  2. export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
  3. export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"

Hope it helps.

@jontingvold
Copy link

jontingvold commented Apr 8, 2021

Thanks @michalpulpan. I can confirm that the following works on my MacBook M1:

brew install unixodbc
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"
pip install pyodbc

pip is here an aliased to /opt/homebrew/bin/pip3

@Ritish-Madan
Copy link

Thanks @michalpulpan. I can confirm that the following works on my MacBook M1:

brew install unixodbc
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"
pip install pyodbc

pip is here an aliased to /opt/homebrew/bin/pip3

I did install the unixODBC using Homebrew. And I have the Python installed using the Graphic Installer, instead of Homebrew installation of Python.

I don't know if it is creating the problem, but installing the unixodbc is still throwing the same error after importing pyodbc

I did also tried using brew install python3, but Homebrew version of python do not install the other libraries like Pandas, Numpy, Pyodbc too. So I installed the Python3 graphically and got all the other libraries installed.

I have MacBook Air M1

Do I have to install the Homebrew version of python3?

@preske87
Copy link

preske87 commented May 9, 2021

Hello,

same and weird issue. Installation in my M1 Mac Mini was working fine. Now attempting to install pyodbc on M1 Macbook Air results in error

philipp@Air-von-Philipp bin % brew install unixodbc
Warning: unixodbc 2.3.9_1 is already installed and up-to-date.
To reinstall 2.3.9_1, run:
  brew reinstall unixodbc
philipp@Air-von-Philipp bin % export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
philipp@Air-von-Philipp bin % export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"
philipp@Air-von-Philipp bin % ./python3 -m pip install pyodbc                                
Collecting pyodbc
  Using cached pyodbc-4.0.30.tar.gz (266 kB)
Building wheels for collected packages: pyodbc
  Building wheel for pyodbc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-wheel-jvs3kf9i
       cwd: /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/
  Complete output (27 lines):
  /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:669: UserWarning: Usage of dash-separated 'library-dirs' will not be supported in future versions. Please use the underscore name 'library_dirs' instead
    warnings.warn(
  running bdist_wheel
  running build
  running build_ext
  building 'pyodbc' extension
  creating build
  creating build/temp.macosx-11-arm64-3.9
  creating build/temp.macosx-11-arm64-3.9/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/buffer.cpp -o build/temp.macosx-11-arm64-3.9/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cnxninfo.cpp -o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/connection.cpp -o build/temp.macosx-11-arm64-3.9/src/connection.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cursor.cpp -o build/temp.macosx-11-arm64-3.9/src/cursor.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/errors.cpp -o build/temp.macosx-11-arm64-3.9/src/errors.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/getdata.cpp -o build/temp.macosx-11-arm64-3.9/src/getdata.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/params.cpp -o build/temp.macosx-11-arm64-3.9/src/params.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbccompat.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcdbg.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcmodule.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/row.cpp -o build/temp.macosx-11-arm64-3.9/src/row.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/textenc.cpp -o build/temp.macosx-11-arm64-3.9/src/textenc.o -Wno-write-strings -Wno-deprecated-declarations
  creating build/lib.macosx-11-arm64-3.9
  clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/homebrew/Cellar/unixodbc/2.3.9/lib -I/opt/homebrew/Cellar/unixodbc/2.3.9/include build/temp.macosx-11-arm64-3.9/src/buffer.o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o build/temp.macosx-11-arm64-3.9/src/connection.o build/temp.macosx-11-arm64-3.9/src/cursor.o build/temp.macosx-11-arm64-3.9/src/errors.o build/temp.macosx-11-arm64-3.9/src/getdata.o build/temp.macosx-11-arm64-3.9/src/params.o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o build/temp.macosx-11-arm64-3.9/src/row.o build/temp.macosx-11-arm64-3.9/src/textenc.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -lodbc -o build/lib.macosx-11-arm64-3.9/pyodbc.cpython-39-darwin.so
  ld: warning: directory not found for option '-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib'
  ld: library not found for -lodbc
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command '/usr/bin/clang++' failed with exit code 1
  ----------------------------------------
  ERROR: 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
    ERROR: Command errored out with exit status 1:
     command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-record-axaz51v3/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/pyodbc
         cwd: /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/
    Complete output (27 lines):
    /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:669: UserWarning: Usage of dash-separated 'library-dirs' will not be supported in future versions. Please use the underscore name 'library_dirs' instead
      warnings.warn(
    running install
    running build
    running build_ext
    building 'pyodbc' extension
    creating build
    creating build/temp.macosx-11-arm64-3.9
    creating build/temp.macosx-11-arm64-3.9/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/buffer.cpp -o build/temp.macosx-11-arm64-3.9/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cnxninfo.cpp -o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/connection.cpp -o build/temp.macosx-11-arm64-3.9/src/connection.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cursor.cpp -o build/temp.macosx-11-arm64-3.9/src/cursor.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/errors.cpp -o build/temp.macosx-11-arm64-3.9/src/errors.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/getdata.cpp -o build/temp.macosx-11-arm64-3.9/src/getdata.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/params.cpp -o build/temp.macosx-11-arm64-3.9/src/params.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbccompat.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcdbg.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcmodule.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/row.cpp -o build/temp.macosx-11-arm64-3.9/src/row.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/textenc.cpp -o build/temp.macosx-11-arm64-3.9/src/textenc.o -Wno-write-strings -Wno-deprecated-declarations
    creating build/lib.macosx-11-arm64-3.9
    clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/homebrew/Cellar/unixodbc/2.3.9/lib -I/opt/homebrew/Cellar/unixodbc/2.3.9/include build/temp.macosx-11-arm64-3.9/src/buffer.o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o build/temp.macosx-11-arm64-3.9/src/connection.o build/temp.macosx-11-arm64-3.9/src/cursor.o build/temp.macosx-11-arm64-3.9/src/errors.o build/temp.macosx-11-arm64-3.9/src/getdata.o build/temp.macosx-11-arm64-3.9/src/params.o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o build/temp.macosx-11-arm64-3.9/src/row.o build/temp.macosx-11-arm64-3.9/src/textenc.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -lodbc -o build/lib.macosx-11-arm64-3.9/pyodbc.cpython-39-darwin.so
    ld: warning: directory not found for option '-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib'
    ld: library not found for -lodbc
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command '/usr/bin/clang++' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-record-axaz51v3/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/pyodbc Check the logs for full command output.

@Ritish-Madan
Copy link

Hello,

same and weird issue. Installation in my M1 Mac Mini was working fine. Now attempting to install pyodbc on M1 Macbook Air results in error

philipp@Air-von-Philipp bin % brew install unixodbc
Warning: unixodbc 2.3.9_1 is already installed and up-to-date.
To reinstall 2.3.9_1, run:
  brew reinstall unixodbc
philipp@Air-von-Philipp bin % export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
philipp@Air-von-Philipp bin % export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"
philipp@Air-von-Philipp bin % ./python3 -m pip install pyodbc                                
Collecting pyodbc
  Using cached pyodbc-4.0.30.tar.gz (266 kB)
Building wheels for collected packages: pyodbc
  Building wheel for pyodbc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-wheel-jvs3kf9i
       cwd: /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/
  Complete output (27 lines):
  /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:669: UserWarning: Usage of dash-separated 'library-dirs' will not be supported in future versions. Please use the underscore name 'library_dirs' instead
    warnings.warn(
  running bdist_wheel
  running build
  running build_ext
  building 'pyodbc' extension
  creating build
  creating build/temp.macosx-11-arm64-3.9
  creating build/temp.macosx-11-arm64-3.9/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/buffer.cpp -o build/temp.macosx-11-arm64-3.9/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cnxninfo.cpp -o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/connection.cpp -o build/temp.macosx-11-arm64-3.9/src/connection.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cursor.cpp -o build/temp.macosx-11-arm64-3.9/src/cursor.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/errors.cpp -o build/temp.macosx-11-arm64-3.9/src/errors.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/getdata.cpp -o build/temp.macosx-11-arm64-3.9/src/getdata.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/params.cpp -o build/temp.macosx-11-arm64-3.9/src/params.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbccompat.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcdbg.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcmodule.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/row.cpp -o build/temp.macosx-11-arm64-3.9/src/row.o -Wno-write-strings -Wno-deprecated-declarations
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/textenc.cpp -o build/temp.macosx-11-arm64-3.9/src/textenc.o -Wno-write-strings -Wno-deprecated-declarations
  creating build/lib.macosx-11-arm64-3.9
  clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/homebrew/Cellar/unixodbc/2.3.9/lib -I/opt/homebrew/Cellar/unixodbc/2.3.9/include build/temp.macosx-11-arm64-3.9/src/buffer.o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o build/temp.macosx-11-arm64-3.9/src/connection.o build/temp.macosx-11-arm64-3.9/src/cursor.o build/temp.macosx-11-arm64-3.9/src/errors.o build/temp.macosx-11-arm64-3.9/src/getdata.o build/temp.macosx-11-arm64-3.9/src/params.o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o build/temp.macosx-11-arm64-3.9/src/row.o build/temp.macosx-11-arm64-3.9/src/textenc.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -lodbc -o build/lib.macosx-11-arm64-3.9/pyodbc.cpython-39-darwin.so
  ld: warning: directory not found for option '-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib'
  ld: library not found for -lodbc
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command '/usr/bin/clang++' failed with exit code 1
  ----------------------------------------
  ERROR: 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
    ERROR: Command errored out with exit status 1:
     command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-record-axaz51v3/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/pyodbc
         cwd: /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/
    Complete output (27 lines):
    /opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py:669: UserWarning: Usage of dash-separated 'library-dirs' will not be supported in future versions. Please use the underscore name 'library_dirs' instead
      warnings.warn(
    running install
    running build
    running build_ext
    building 'pyodbc' extension
    creating build
    creating build/temp.macosx-11-arm64-3.9
    creating build/temp.macosx-11-arm64-3.9/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/buffer.cpp -o build/temp.macosx-11-arm64-3.9/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cnxninfo.cpp -o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/connection.cpp -o build/temp.macosx-11-arm64-3.9/src/connection.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cursor.cpp -o build/temp.macosx-11-arm64-3.9/src/cursor.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/errors.cpp -o build/temp.macosx-11-arm64-3.9/src/errors.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/getdata.cpp -o build/temp.macosx-11-arm64-3.9/src/getdata.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/params.cpp -o build/temp.macosx-11-arm64-3.9/src/params.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbccompat.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcdbg.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pyodbcmodule.cpp -o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/row.cpp -o build/temp.macosx-11-arm64-3.9/src/row.o -Wno-write-strings -Wno-deprecated-declarations
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/homebrew/Cellar/unixodbc/2.3.9/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/textenc.cpp -o build/temp.macosx-11-arm64-3.9/src/textenc.o -Wno-write-strings -Wno-deprecated-declarations
    creating build/lib.macosx-11-arm64-3.9
    clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/homebrew/Cellar/unixodbc/2.3.9/lib -I/opt/homebrew/Cellar/unixodbc/2.3.9/include build/temp.macosx-11-arm64-3.9/src/buffer.o build/temp.macosx-11-arm64-3.9/src/cnxninfo.o build/temp.macosx-11-arm64-3.9/src/connection.o build/temp.macosx-11-arm64-3.9/src/cursor.o build/temp.macosx-11-arm64-3.9/src/errors.o build/temp.macosx-11-arm64-3.9/src/getdata.o build/temp.macosx-11-arm64-3.9/src/params.o build/temp.macosx-11-arm64-3.9/src/pyodbccompat.o build/temp.macosx-11-arm64-3.9/src/pyodbcdbg.o build/temp.macosx-11-arm64-3.9/src/pyodbcmodule.o build/temp.macosx-11-arm64-3.9/src/row.o build/temp.macosx-11-arm64-3.9/src/textenc.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -lodbc -o build/lib.macosx-11-arm64-3.9/pyodbc.cpython-39-darwin.so
    ld: warning: directory not found for option '-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib'
    ld: library not found for -lodbc
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command '/usr/bin/clang++' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-install-g4_8mhh3/pyodbc_22c0b0b00fb04cce958d2ba3342d2ea4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2r/8hjh8rp56lg9_rbzhclms3q80000gn/T/pip-record-axaz51v3/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/pyodbc Check the logs for full command output.

@preske87 if you are using the brew version of the Python 3.9.5 or the default 3.8 version of Python. They are having some bug. I fixed this by uninstalling the brew version of Python and installing python 3.9.5 graphical from Python website.

Maybe this would fix the issue

@Ritish-Madan
Copy link

Thanks @michalpulpan. I can confirm that the following works on my MacBook M1:

brew install unixodbc
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"
pip install pyodbc

pip is here an aliased to /opt/homebrew/bin/pip3

I did install the unixODBC using Homebrew. And I have the Python installed using the Graphic Installer, instead of Homebrew installation of Python.

I don't know if it is creating the problem, but installing the unixodbc is still throwing the same error after importing pyodbc

I did also tried using brew install python3, but Homebrew version of python do not install the other libraries like Pandas, Numpy, Pyodbc too. So I installed the Python3 graphically and got all the other libraries installed.

I have MacBook Air M1

Do I have to install the Homebrew version of python3?

I solved this issue using the soft linking to unixODBC folder, as I have unix odbc from brew and Python3 from Graphical installation . But the the error arrises that states that architecture is not compatible.

@v-chojas
Copy link
Contributor

But the the error arrises that states that architecture is not compatible.

That occurs if you are mixing ARM and x86 binaries. Note that unless you have native ARM ODBC drivers available that you can use with pyODBC, everything should "just work" if you have a consistently x86 environment and use Rosetta2 emulation instead.

@preske87
Copy link

Just tried again:

  • downloaded and installed Python 3.9.5
  • created venv
  • sourced / activated venv
  • executed pip install pyodbc
  • started interactive python shell and tried to import
(test) philipp@Air-von-Philipp python_venv_test % pip install pyodbc
Collecting pyodbc
  Using cached pyodbc-4.0.30-cp39-cp39-macosx_10_9_x86_64.whl (63 kB)
Installing collected packages: pyodbc
Successfully installed pyodbc-4.0.30
(test) philipp@Air-von-Philipp python_venv_test % python --version
Python 3.9.5
(test) philipp@Air-von-Philipp python_venv_test % python
Python 3.9.5 (v3.9.5:0a7dcbdb13, May  3 2021, 13:17:02) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyodbc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/philipp/Desktop/python_venv_test/test/lib/python3.9/site-packages/pyodbc.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/unixodbc/lib/libodbc.2.dylib
  Referenced from: /Users/philipp/Desktop/python_venv_test/test/lib/python3.9/site-packages/pyodbc.cpython-39-darwin.so
  Reason: image not found

@Ritish-Madan
Copy link

Yep that's the issue with the Mac M1 Silicon Built MacBooks. The PyODBC I guess is not yet supported as when I try to create a soft link with the UniXODBC, it shows Architecture not compatible

@Ritish-Madan
Copy link

Do anyone here is using PyODBC on Mac M1 silicon processor?

@v-chojas
Copy link
Contributor

macosx_10_9_x86_64.whl

That's the x86 version. You'll also need the x86 version of unixODBC installed in order to use it.

@preske87
Copy link

OK, I am using pymssqland this runs smoothly

@Ritish-Madan
Copy link

macosx_10_9_x86_64.whl

That's the x86 version. You'll also need the x86 version of unixODBC installed in order to use it.

So, any idea how we can install the same if it is already available?

@angelhurst
Copy link

Do anyone here is using PyODBC on Mac M1 silicon processor?

Yes, docker using plattform linux/amd64

@mkleehammer
Copy link
Owner

I have my old Intel Macbook Air and I can use my wife's M1. (It will take some convincing that I won't mess it up ;) I'm using LInux exclusively on my new job so I haven't been keeping up. Does anyone know what has been ported and what hasn't?

I assume there is an M1 Python build. What about unixODBC and PostgreSQLs ODBC driver?

Does brew provide an easy way to tell which is which when working on the M1?

@Ritish-Madan
Copy link

OK, I am using pymssqland this runs smoothly

@preske87 Are you using it on MacBook M1? And how did you install the Python3 build? Using brew or Graphical Installation? What is the version of your python3? Actually I am facing No Module found in pymssql as well

@Ritish-Madan Yes, am using MacBook M1 and MacMini M1.
I have 2 python3 installed:

  • the brew package /opt/homebrew/bin/python3 in version 3.9.1
  • the standard package (installed through pkg / graphical installer) /usr/bin/python3version 3.8.2

Only for the brew pymssqlcould be used. I needed to run brew install freetds and /opt/homebrew/bin/python3 -m pip install pymssqlprior

Yep, that is works perfectly fine. I am using the Conda Miniforge, and was facing the issue if file sqlfront.h not found error.

So, I figured it out by using

brew install python

and then

brew install freetds

Free TDS won't be detected by any virtual Environment untill brew version of Python is installed. Also figured out that Microsoft has clearly mentioned that Microsoft ODBC drivers are not currently supported on M1 powered machines. So PyODBC would not work, even if we install the same on our environment. We however would need to use docker.

After all we can directly install pymssql

pip install pymssql

and it would work fine

@mkleehammer
Copy link
Owner

mkleehammer commented Aug 22, 2021

I was really hoping GitHub Actions would already support M1 runners which we could use for automated tests and packaging, but they aren't ready yet: actions/runner-images#2187

You'd think Apple might kick in some resources to help with this.

I have access to my wife's M1 so I'll be looking at this again soon.

@JayBaywatch
Copy link

I'd be happy to kick in $100 towards an m1 fund to get you resources to resolve this issue if someone wants to start said fund.

I've tried everything and nothing works for me.

I'm trying the new MSODBC SQL 17 drivers for the m1. isql and sqlcmd work, but pyodbc always complains:

Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib' : file not found (0) (SQLDriverConnect)")

I built pyodbc from source:
otool -L /opt/anaconda/2020/envs/py_37_pands0.25/lib/python3.8/site-packages/pyodbc-4.0.32-py3.8-macosx-10.9-x86_64.egg/pyodbc.cpython-38-darwin.so
otool -L /opt/anaconda/2020/envs/py_37_pands0.25/lib/python3.8/site-packages/pyodbc-4.0.32-py3.8-macosx-10.9-x86_64.egg/pyodbc.cpython-38-darwin.so
/opt/anaconda/2020/envs/py_37_pands0.25/lib/python3.8/site-packages/pyodbc-4.0.32-py3.8-macosx-10.9-x86_64.egg/pyodbc.cpython-38-darwin.so:
@rpath/libodbc.2.dylib (compatibility version 3.0.0, current version 3.0.0)
@rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)

these both work out ok:
import os
print(os.access('/opt/homebrew/lib/libmsodbcsql.17.dylib', os.R_OK))

print(os.access('/opt/anaconda/2020/envs/py_37_pands0.25/lib/python3.8/site-packages/pyodbc-4.0.32-py3.8-macosx-10.9-x86_64.egg/pyodbc.cpython-38-darwin.so', os.R_OK))

@j0nnyr0berts
Copy link

Was able to get around the fatal error: 'sql.h' file not found on an M1 by modifying the setup.py file to account for the M1 version of homebrew installing to /opt/ instead of /usr/ but having the same file not found error as @JayBaywatch when attempting to connect.

Have spent some time attempting to debug this but not getting anywhere at the moment. Would be extremely grateful for any pointers!

@v-chojas
Copy link
Contributor

pyodbc-4.0.32-py3.8-macosx-10.9-x86_64.egg/pyodbc.cpython-38-darwin.so

Are you attempting to use Rosetta2 emulation, or native ARM? These M1s can run both, but your software needs to be fully consistent in architecture from Python to pyODBC to unixODBC to the ODBC driver whichever you choose - you cannot mix e.g. ARM Python with x86 pyODBC.

@j0nnyr0berts
Copy link

I've just noticed that the ODBC driver is x86 - thanks for the rapid response!

@idokrn
Copy link

idokrn commented Nov 16, 2021

To fix the new homebrew dir path on mac m1:

i just created a symlink from new homebrew dir to the old one
$ sudo ln /opt/homebrew/include/* /usr/local/include/
$ sudo ln /opt/homebrew/lib/* /usr/local/lib/

@v-chojas
Copy link
Contributor

Be careful to not mix the two architecture's binaries, because that will cause a lot of confusion.

@LakshayRohilla
Copy link

LakshayRohilla commented Dec 6, 2021

Hi, I have installed unixodbc via brew; and installed correctly. However, when installing pyodbc, I get the following error message, followed by more information, with mention sql.h is not found Collecting pyodbc Using cached pyodbc-4.0.30.tar.gz (266 kB) Building wheels for collected packages: pyodbc Building wheel for pyodbc (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/marcozanella/.pyenv/versions/3.9.1/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-install-05exfppr/pyodbc_64a047783b5647e98f08d3659e1cd34b/setup.py'"'"'; file='"'"'/private/var/folders/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-install-05exfppr/pyodbc_64a047783b5647e98f08d3659e1cd34b/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/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-wheel-de40jc02 cwd: /private/var/folders/dk/kq7_26dj5z79542rb3jp0c340000gn/T/pip-install-05exfppr/pyodbc_64a047783b5647e98f08d3659e1cd34b/ Complete output (14 lines): running bdist_wheel running build running build_ext building 'pyodbc' extension creating build creating build/temp.macosx-11.2-arm64-3.9 creating build/temp.macosx-11.2-arm64-3.9/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DPYODBC_VERSION=4.0.30 -UMAC_OS_X_VERSION_10_7 -I/Users/marcozanella/.pyenv/versions/3.9.1/include/python3.9 -c src/buffer.cpp -o build/temp.macosx-11.2-arm64-3.9/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations In file included from src/buffer.cpp:12: src/pyodbc.h:56:10: fatal error: 'sql.h' file not found #include <sql.h> ^~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1

I managed to solve the src/pyodbc.h:56:10: fatal error: 'sql.h' file not found issue on my M1 (Apple Silicion) MacBook Pro by running:

  1. brew install unixodbc
  2. export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
  3. export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"

Hope it helps.

This one worked for me.
Im using MacBook Pro with M1 chip. And faced this issue in pycharm.

  1. export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9/lib"
  2. export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9/include"

In these 2 commands just change the version of unixodbc which you are using.
Thank you!!

@hxmwr
Copy link

hxmwr commented Jan 7, 2022

import pyodbc
cnx = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)

M1 mac: pyodbc cause python crashed

Process: Python [3968]
Path: /Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.9.7 (3.9.7)
Code Type: ARM-64 (Native)
Parent Process: zsh [481]
Responsible: iTerm2 [408]
User ID: 501

Date/Time: 2022-01-07 12:17:23.448 +0800
OS Version: macOS 11.6 (20G165)
Report Version: 12
Anonymous UUID: 24D9E309-3297-6A05-5A4A-349CE4B6C452

Sleep/Wake UUID: 71F09A45-CB35-4D64-AF8E-73786861C2FF

Time Awake Since Boot: 3000 seconds
Time Since Wake: 1300 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
stack buffer overflow

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x0000000185984e68 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001859b743c pthread_kill + 292
2 libsystem_c.dylib 0x00000001858ff4e0 __abort + 128
3 libsystem_c.dylib 0x00000001858df15c __stack_chk_fail + 96
4 pyodbc.cpython-39-darwin.so 0x0000000102d635c8 GetErrorFromHandle(Connection*, char const*, void*, void*) + 1024
5 pyodbc.cpython-39-darwin.so 0x0000000102d6317c RaiseErrorFromHandle(Connection*, char const*, void*, void*) + 16
6 pyodbc.cpython-39-darwin.so 0x0000000102d5ccf0 Connection_New(_object*, bool, bool, long, bool, _object*, Object&) + 1312
7 pyodbc.cpython-39-darwin.so 0x0000000102d68b4c mod_connect(_object*, _object*, _object*) + 1468
8 org.python.python 0x0000000102f3dd18 cfunction_call + 84
9 org.python.python 0x0000000102efbe80 _PyObject_MakeTpCall + 360
10 org.python.python 0x0000000102fd0464 call_function + 512
11 org.python.python 0x0000000102fcdd78 _PyEval_EvalFrameDefault + 23316
12 org.python.python 0x0000000102fd137c _PyEval_EvalCode + 3072
13 org.python.python 0x0000000102fc819c PyEval_EvalCode + 80
14 org.python.python 0x000000010300e024 PyRun_InteractiveOneObjectEx + 816
15 org.python.python 0x000000010300d660 PyRun_InteractiveLoopFlags + 156
16 org.python.python 0x000000010300d580 PyRun_AnyFileExFlags + 72
17 org.python.python 0x000000010302aec8 Py_RunMain + 2144
18 org.python.python 0x000000010302b1dc pymain_main + 340
19 org.python.python 0x000000010302b258 Py_BytesMain + 40
20 libdyld.dylib 0x00000001859d5430 start + 4

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x00676f6c7379732f x7: 0x00000001036b9d28
x8: 0x17cbae1e7c98d138 x9: 0x17cbae1f7e7e2c78 x10: 0x0000000000000000 x11: 0x0000000000000034
x12: 0x0000000103690000 x13: 0x00000000ffff8011 x14: 0x000000000000000a x15: 0x0000000103140b10
x16: 0x0000000000000148 x17: 0x00000001f443ee90 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000102e6fd40 x21: 0x0000000000000103 x22: 0x0000000102e6fe20 x23: 0x000000016d306b34
x24: 0x0000000127605cc0 x25: 0x00000000ffffffff x26: 0x00000000ffffffff x27: 0x0000000102c51b90
x28: 0x0000000000000001 fp: 0x000000016d306a50 lr: 0x00000001859b743c
sp: 0x000000016d306a30 pc: 0x0000000185984e68 cpsr: 0x40000000
far: 0x0000000102b0c010 esr: 0x56000080

Binary Images:
0x102af8000 - 0x102afbfff +org.python.python (3.9.7 - 3.9.7) /Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
0x102cd8000 - 0x102cdbfff +readline.cpython-39-darwin.so (0) <9C3D6B3D-3075-3EF0-9DBC-A22071D1488E> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so
0x102cf0000 - 0x102d3bfff +libncursesw.5.dylib (0) /Library/Frameworks/Python.framework/Versions/3.9/lib/libncursesw.5.dylib
0x102d58000 - 0x102d6ffff +pyodbc.cpython-39-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyodbc.cpython-39-darwin.so
0x102d88000 - 0x102d8ffff +libltdl.7.dylib (0) /opt/homebrew//libltdl.7.dylib
0x102da0000 - 0x102da3fff +_heapq.cpython-39-darwin.so (0) <1D77422C-263F-32C7-948D-FF5E0E3DB9D8> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_heapq.cpython-39-darwin.so
0x102db4000 - 0x102e33fff dyld (852.2) <38657979-1ABE-3C9A-BF64-EF3B746216AB> /usr/lib/dyld
0x102ebc000 - 0x103123fff +org.python.python (3.9.7, [c] 2001-2019 Python Software Foundation. - 3.9.7) /Library/Frameworks/Python.framework/Versions/3.9/Python
0x10326c000 - 0x1032b3fff +libodbc.2.dylib (0) /opt/homebrew/
/libodbc.2.dylib
0x10330c000 - 0x103317fff +math.cpython-39-darwin.so (0) <7F5E637B-2689-30BE-BDD8-21DA748DB0BA> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/math.cpython-39-darwin.so
0x10332c000 - 0x10333ffff +_datetime.cpython-39-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_datetime.cpython-39-darwin.so
0x103358000 - 0x10335ffff +_hashlib.cpython-39-darwin.so (0) <5AACE2E9-99B4-3F83-9308-A5C367B069BB> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_hashlib.cpython-39-darwin.so
0x103374000 - 0x1033c7fff +libssl.1.1.dylib (0) <6711031A-A2E7-3478-9ED6-8F28C56CD434> /Library/Frameworks/Python.framework/Versions/3.9/lib/libssl.1.1.dylib
0x1033fc000 - 0x103597fff +libcrypto.1.1.dylib (0) <8060DB22-9EAA-3D35-9234-966196F4E18D> /Library/Frameworks/Python.framework/Versions/3.9/lib/libcrypto.1.1.dylib
0x103634000 - 0x10363bfff +_blake2.cpython-39-darwin.so (0) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_blake2.cpython-39-darwin.so
0x185712000 - 0x185713fff libsystem_blocks.dylib (79) /usr/lib/system/libsystem_blocks.dylib
0x185714000 - 0x18574bfff libxpc.dylib (2038.120.1) <0E990C5D-C4F7-304A-9714-4409647CC2EF> /usr/lib/system/libxpc.dylib
0x18574c000 - 0x185763fff libsystem_trace.dylib (1277.120.1) <7A6B4800-8D94-3091-AC78-2D6B97A9B496> /usr/lib/system/libsystem_trace.dylib
0x185764000 - 0x1857d7fff libcorecrypto.dylib (1000.140.4) /usr/lib/system/libcorecrypto.dylib
0x1857d8000 - 0x185803fff libsystem_malloc.dylib (317.140.5) /usr/lib/system/libsystem_malloc.dylib
0x185804000 - 0x185848fff libdispatch.dylib (1271.120.2) <4EDD5F72-2296-3891-B2A1-6741DB6C05C9> /usr/lib/system/libdispatch.dylib
0x185849000 - 0x185882fff libobjc.A.dylib (824) <252C93CC-2D39-3C15-87F6-1336658B2F49> /usr/lib/libobjc.A.dylib
0x185883000 - 0x185885fff libsystem_featureflags.dylib (28.60.1) <61A79E0B-1836-376D-AC24-171B40A9FAE7> /usr/lib/system/libsystem_featureflags.dylib
0x185886000 - 0x185907fff libsystem_c.dylib (1439.141.1) <9B3C0AD0-1E0B-39D1-BE25-B97F8EA7E623> /usr/lib/system/libsystem_c.dylib
0x185908000 - 0x185963fff libc++.1.dylib (905.6) /usr/lib/libc++.1.dylib
0x185964000 - 0x18597bfff libc++abi.dylib (905.6) <3C5176E2-CE48-312B-97F6-23D4E7AFA43F> /usr/lib/libc++abi.dylib
0x18597c000 - 0x1859affff libsystem_kernel.dylib (7195.141.6) /usr/lib/system/libsystem_kernel.dylib
0x1859b0000 - 0x1859bcfff libsystem_pthread.dylib (454.120.2) /usr/lib/system/libsystem_pthread.dylib
0x1859bd000 - 0x1859fefff libdyld.dylib (852.2) /usr/lib/system/libdyld.dylib
0x1859ff000 - 0x185a05fff libsystem_platform.dylib (254.80.2) <2CC11FAD-1E31-3533-B1D8-9CDDF5DFE595> /usr/lib/system/libsystem_platform.dylib
0x185a06000 - 0x185a31fff libsystem_info.dylib (542.40.3) <3B5B9F97-ECFB-3F6E-9B85-D8C62A8B3205> /usr/lib/system/libsystem_info.dylib
0x185a32000 - 0x185ee0fff com.apple.CoreFoundation (6.9 - 1778.101) <1FC1BD60-DC83-3CC7-89AC-D734DC18473A> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x185ee1000 - 0x186119fff com.apple.LaunchServices (1122.44 - 1122.44) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x18611a000 - 0x1861f4fff com.apple.gpusw.MetalTools (1.0 - 1) /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
0x1861f5000 - 0x18645ffff libBLAS.dylib (1336.140.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x186460000 - 0x1864aafff com.apple.Lexicon-framework (1.0 - 86.2) /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
0x1864ab000 - 0x18650efff libSparse.dylib (106) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
0x18650f000 - 0x186596fff com.apple.SystemConfiguration (1.20 - 1.20) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x186597000 - 0x1865cafff libCRFSuite.dylib (50) /usr/lib/libCRFSuite.dylib
0x1865cb000 - 0x1867f9fff libmecabra.dylib (929.10) /usr/lib/libmecabra.dylib
0x1867fa000 - 0x186b86fff com.apple.Foundation (6.9 - 1778.101) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x186b87000 - 0x186c76fff com.apple.LanguageModeling (1.0 - 247.3) /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
0x186c77000 - 0x186d99fff com.apple.CoreDisplay (237.4 - 237.4) <2CC8483E-D168-3B0D-9E08-9381248D02BF> /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
0x186d9a000 - 0x187002fff com.apple.audio.AudioToolboxCore (1.0 - 1181.72) <9427F25C-CE4F-3CC4-985F-E8968FDB2ECA> /System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore
0x187003000 - 0x1871d2fff com.apple.CoreText (677.6.0.2 - 677.6.0.2) /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
0x1871d3000 - 0x1877edfff com.apple.audio.CoreAudio (5.0 - 5.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x1877ee000 - 0x187b54fff com.apple.security (7.0 - 59754.140.13) <38B23856-B7E5-3AA2-9F35-F5ACECB8E5D9> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x187b55000 - 0x187dc6fff libicucore.A.dylib (66112) <987F240B-946D-3F96-AD1A-F3EF6752D5DB> /usr/lib/libicucore.A.dylib
0x187dc7000 - 0x187dd1fff libsystem_darwin.dylib (1439.141.1) <9BF54A49-874D-3D91-B319-6B2F676FE42D> /usr/lib/system/libsystem_darwin.dylib
0x187dd2000 - 0x1880c5fff com.apple.CoreServices.CarbonCore (1307.3 - 1307.3) <2D5028C9-5466-3020-B1E6-0ACD3B80AC24> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x188102000 - 0x18813dfff com.apple.CSStore (1122.44 - 1122.44) <26E267F1-2A76-389C-9440-9F3EB0F2C1C0> /System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore
0x18813e000 - 0x188209fff com.apple.framework.IOKit (2.0.2 - 1845.120.6) <861ED733-56AF-311B-949E-DC077817E257> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x18820a000 - 0x188215fff libsystem_notify.dylib (279.40.4) /usr/lib/system/libsystem_notify.dylib
0x189617000 - 0x189d5ffff libnetwork.dylib (2288.140.7) <992E11C6-A4C3-344F-80F9-D49FC41F9EBB> /usr/lib/libnetwork.dylib
0x189d60000 - 0x18a1e8fff com.apple.CFNetwork (1240.0.4 - 1240.0.4) <9DDF924B-F7D9-3E7E-B2D0-27CF26767169> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x18a1e9000 - 0x18a1f8fff libsystem_networkextension.dylib (1295.140.3) <0FFACDE5-D546-306D-B9FA-06EC8FCAEEF9> /usr/lib/system/libsystem_networkextension.dylib
0x18a1f9000 - 0x18a1fafff libenergytrace.dylib (22.100.1) <9175E063-EC99-3395-A576-2E7E8EFDB736> /usr/lib/libenergytrace.dylib
0x18a1fb000 - 0x18a24dfff libMobileGestalt.dylib (978.140.1) <961DF322-11B4-3E9C-A2D6-D96EB159E0F7> /usr/lib/libMobileGestalt.dylib
0x18a24e000 - 0x18a265fff libsystem_asl.dylib (385) <7F462B8A-541F-3195-9BAE-CDEDFA3BA8A4> /usr/lib/system/libsystem_asl.dylib
0x18a266000 - 0x18a27ffff com.apple.TCC (1.0 - 1) <207AAC8A-1E0E-329F-B19E-BB443993C492> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x18a280000 - 0x18a5eefff com.apple.SkyLight (1.600.0 - 588.7) <42D48BB2-B5B8-36EB-89B5-DEC02FAD414B> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
0x18a5ef000 - 0x18abdcfff com.apple.CoreGraphics (2.0 - 1463.17.3) <2411F322-E2CB-3E13-B7E5-7356CDFA093C> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x18abdd000 - 0x18acd2fff com.apple.ColorSync (4.13.0 - 3473.4.3) /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x18acd3000 - 0x18ad2efff com.apple.HIServices (1.22 - 716) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x18b088000 - 0x18b430fff com.apple.CoreData (120 - 1048) <793DB28D-4D44-346D-84F5-2924E4C90CEA> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x18b431000 - 0x18b447fff com.apple.ProtocolBuffer (1 - 285.24.10.20.1) /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer
0x18b448000 - 0x18b5e5fff libsqlite3.dylib (321.3) <5C9A38A7-82B6-3A73-BD16-1D32C3B978C0> /usr/lib/libsqlite3.dylib
0x18b65b000 - 0x18b671fff com.apple.commonutilities (8.0 - 900) <8FB5F198-91AB-3C57-B304-A9EEF49FAFDB> /System/Library/PrivateFrameworks/CommonUtilities.framework/Versions/A/CommonUtilities
0x18b672000 - 0x18b6f4fff com.apple.BaseBoard (526 - 526) /System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard
0x18b6f5000 - 0x18b742fff com.apple.RunningBoardServices (1.0 - 505.100.9) <651DE9C8-E7B1-3452-842D-0808F615E4D9> /System/Library/PrivateFrameworks/RunningBoardServices.framework/Versions/A/RunningBoardServices
0x18b743000 - 0x18b7b6fff com.apple.AE (918.6 - 918.6) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x18b7b7000 - 0x18b7befff libdns_services.dylib (1310.140.1) <57E2AA69-70BC-3BC5-90C2-4E6152B2A7BB> /usr/lib/libdns_services.dylib
0x18b7bf000 - 0x18b7c6fff libsystem_symptoms.dylib (1431.140.1) <0B4FC817-CC87-31F2-872B-BD505D29F5EE> /usr/lib/system/libsystem_symptoms.dylib
0x18b7c7000 - 0x18b923fff com.apple.Network (1.0 - 1) <1CF3457C-B1F3-3643-A404-E74EC9C587A0> /System/Library/Frameworks/Network.framework/Versions/A/Network
0x18b924000 - 0x18b956fff com.apple.analyticsd (1.0 - 1) <38259CAA-FC30-3B56-A371-3E6A6AC5D1CA> /System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics
0x18b957000 - 0x18b959fff libDiagnosticMessagesClient.dylib (112) <3B3CE40D-33BF-351F-B539-ACD4AF8CDF2E> /usr/lib/libDiagnosticMessagesClient.dylib
0x18b95a000 - 0x18b9a5fff com.apple.spotlight.metadata.utilities (1.0 - 2150.26) <7EA4F807-3DEB-3B59-9112-B632641123EA> /System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities
0x18b9a6000 - 0x18ba3ffff com.apple.Metadata (10.7.0 - 2150.26) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x18ba40000 - 0x18ba46fff com.apple.DiskArbitration (2.7 - 2.7) <03246747-F25B-3D05-B2E7-1BE69E878EF3> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x18ba47000 - 0x18bd51fff com.apple.vImage (8.1 - 544.4) <88CFC382-4A40-3339-A5F2-81FDA6D902B3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x18bd52000 - 0x18c00ffff com.apple.QuartzCore (1.11 - 927.24) <1077F760-1430-3263-8E32-2B273631B479> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x18c010000 - 0x18c051fff libFontRegistry.dylib (309) <4608D786-2101-39B4-8243-04EA0BDB4A5F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x18c052000 - 0x18c169fff com.apple.coreui (2.1 - 692.1) <71572479-4BDB-3BDD-993D-FF5202AFC8E3> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x18c24a000 - 0x18c254fff com.apple.PerformanceAnalysis (1.278.3 - 278.3) <81A40179-1530-3EFE-B2D9-EDE9189CF854> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
0x18c255000 - 0x18c262fff com.apple.OpenDirectory (11.6 - 230.40.1) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x18c263000 - 0x18c282fff com.apple.CFOpenDirectory (11.6 - 230.40.1) <254CB692-3AF0-387D-9EAD-AA72B7F34A59> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x18c283000 - 0x18c28ffff com.apple.CoreServices.FSEvents (1290.120.5 - 1290.120.5) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
0x18c290000 - 0x18c2b3fff com.apple.coreservices.SharedFileList (144 - 144) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
0x18c2b4000 - 0x18c2b6fff libapp_launch_measurement.dylib (14.1) /usr/lib/libapp_launch_measurement.dylib
0x18c2b7000 - 0x18c2f9fff com.apple.CoreAutoLayout (1.0 - 21.10.1) <5789DEAE-4BBD-3679-964B-40D6E208E8E8> /System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout
0x18c2fa000 - 0x18c3e6fff libxml2.2.dylib (34.10) <9C392F20-D487-3A66-93AD-87BA9D7E403E> /usr/lib/libxml2.2.dylib
0x18c3e7000 - 0x18c43afff com.apple.CoreVideo (1.8 - 414.7) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x18c43b000 - 0x18c43dfff com.apple.loginsupport (1.0 - 1) /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
0x18d61b000 - 0x18d62cfff libsystem_containermanager.dylib (318.100.4) /usr/lib/system/libsystem_containermanager.dylib
0x18d62d000 - 0x18d63efff com.apple.IOSurface (290.8.1 - 290.8.1) <6ACC766E-E6F9-3C00-8260-8DB708F1564B> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x18d63f000 - 0x18d648fff com.apple.IOAccelerator (442.9 - 442.9) /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
0x18d649000 - 0x18d737fff com.apple.Metal (244.303 - 244.303) <6F669C63-4630-3788-871F-E53E3E01E0E1> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
0x18d738000 - 0x18d757fff com.apple.audio.caulk (1.0 - 70) /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
0x18d758000 - 0x18d84ffff com.apple.CoreMedia (1.0 - 2780.10) /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia
0x18d850000 - 0x18d9a8fff libFontParser.dylib (305.6.0.4) /System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib
0x18d9a9000 - 0x18dcb3fff com.apple.HIToolbox (2.1.1 - 1062) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x18dcd0000 - 0x18dcfafff com.apple.CoreSVG (1.0 - 149) <22C3C4CF-94DD-3F9C-9332-E7F1B40B4FC2> /System/Library/PrivateFrameworks/CoreSVG.framework/Versions/A/CoreSVG
0x18dcfb000 - 0x18df1afff com.apple.ImageIO (3.3.0 - 2130.7.3) <8C7ADB80-880A-3811-BC89-3DF7F63FB8AB> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x18df1b000 - 0x18e233fff com.apple.CoreImage (16.3.0 - 1140.2) /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
0x18e234000 - 0x18e298fff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSCore.framework/Versions/A/MPSCore
0x18e299000 - 0x18e29dfff libsystem_configuration.dylib (1109.140.1) <9BC511C4-6613-3F1D-8592-7D3971B24921> /usr/lib/system/libsystem_configuration.dylib
0x18e29e000 - 0x18e2a2fff libsystem_sandbox.dylib (1441.141.4) /usr/lib/system/libsystem_sandbox.dylib
0x18e2a3000 - 0x18e2a4fff com.apple.AggregateDictionary (1.0 - 1) /System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary
0x18e2a5000 - 0x18e2a8fff com.apple.AppleSystemInfo (3.1.5 - 3.1.5) <30FA6080-7520-32BF-86BF-CD8AACD9E956> /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo
0x18e2a9000 - 0x18e2aafff liblangid.dylib (136) /usr/lib/liblangid.dylib
0x18e2ab000 - 0x18e338fff com.apple.CoreNLP (1.0 - 245.2) <8D86FF1B-B90A-37FD-990D-CEA65FE35181> /System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP
0x18e339000 - 0x18e340fff com.apple.LinguisticData (1.0 - 399) <17E4D57B-5A70-3EC3-8BF5-82B80EFB3348> /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
0x18e341000 - 0x18e7fffff libBNNS.dylib (288.100.5) <68DE4998-AAF1-35A2-A2F8-28A2E0CBA48C> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
0x18e800000 - 0x18e8aefff libvDSP.dylib (760.100.3) <5CB9D8BD-028D-318B-99F1-931F53997697> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x18e8af000 - 0x18e8c1fff com.apple.CoreEmoji (1.0 - 128.4) /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
0x18e8c2000 - 0x18e8ccfff com.apple.IOMobileFramebuffer (343.0.0 - 343.0.0) /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/Versions/A/IOMobileFramebuffer
0x18ebbb000 - 0x18ebcafff com.apple.AssertionServices (1.0 - 505.100.9) /System/Library/PrivateFrameworks/AssertionServices.framework/Versions/A/AssertionServices
0x18ebcb000 - 0x18ec4efff com.apple.securityfoundation (6.0 - 55240.40.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x18ec4f000 - 0x18ec58fff com.apple.coreservices.BackgroundTaskManagement (1.0 - 104) <7BC12DCA-0109-39D5-B5DE-398520550D66> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
0x18ec59000 - 0x18ec5efff com.apple.xpc.ServiceManagement (1.0 - 1) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
0x18ec5f000 - 0x18ec61fff libquarantine.dylib (119.40.2) /usr/lib/system/libquarantine.dylib
0x18ec62000 - 0x18ec71fff libCheckFix.dylib (31) <95D7D1F7-7C6F-3517-9872-79FCCCCC9D69> /usr/lib/libCheckFix.dylib
0x18ec72000 - 0x18ec88fff libcoretls.dylib (169.100.1) /usr/lib/libcoretls.dylib
0x18ec89000 - 0x18ec99fff libbsm.0.dylib (68.40.1) <51614EB7-9B57-3F8F-9679-DDA22278CC9F> /usr/lib/libbsm.0.dylib
0x18ec9a000 - 0x18ecdffff libmecab.dylib (929.10) /usr/lib/libmecab.dylib
0x18ece0000 - 0x18ece4fff libgermantok.dylib (24) /usr/lib/libgermantok.dylib
0x18ece5000 - 0x18ecf9fff libLinearAlgebra.dylib (1336.140.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x18ecfa000 - 0x18eefdfff com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) <75A63926-9BBF-3FD7-AB8F-BAD7DFF3A881> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
0x18eefe000 - 0x18ef47fff com.apple.MetalPerformanceShaders.MPSRayIntersector (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector
0x18ef48000 - 0x18f09afff com.apple.MLCompute (1.0 - 1) <3C4B7923-366A-3F89-9BE2-00D7252F59A6> /System/Library/Frameworks/MLCompute.framework/Versions/A/MLCompute
0x18f09b000 - 0x18f0c9fff com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
0x18f0ca000 - 0x18f11cfff com.apple.MetalPerformanceShaders.MPSNDArray (1.0 - 1) <15018D77-2512-3FB8-A170-4DF3DF5AF90D> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray
0x18f11d000 - 0x18f1a4fff com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) <83375879-A492-3EC8-A57A-7630E7C12D33> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSImage.framework/Versions/A/MPSImage
0x18f1a5000 - 0x18f1b4fff com.apple.AppleFSCompression (125 - 1.0) /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
0x18f1b5000 - 0x18f1c1fff libbz2.1.0.dylib (44) /usr/lib/libbz2.1.0.dylib
0x18f1c2000 - 0x18f1c6fff libsystem_coreservices.dylib (127.1) /usr/lib/system/libsystem_coreservices.dylib
0x18f1c7000 - 0x18f1f7fff com.apple.CoreServices.OSServices (1122.44 - 1122.44) <3B9B314C-8F7D-3058-9B89-6D4897868633> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x18f3ac000 - 0x18f3bdfff libz.1.dylib (76) <4838F5D2-C9BB-366A-9745-209A80BCC426> /usr/lib/libz.1.dylib
0x18f3be000 - 0x18f3ebfff libsystem_m.dylib (3186.100.3) <092A6565-3BE3-3EEF-844E-B846793A4115> /usr/lib/system/libsystem_m.dylib
0x18f3ec000 - 0x18f3ecfff libcharset.1.dylib (59) <7A25825A-D346-3BB8-AA3F-498510B5E31F> /usr/lib/libcharset.1.dylib
0x18f3ed000 - 0x18f3f2fff libmacho.dylib (980) /usr/lib/system/libmacho.dylib
0x18f3f3000 - 0x18f40afff libkxld.dylib (7195.141.6) <9C25AE8F-59E2-3963-B645-025A7661A69A> /usr/lib/system/libkxld.dylib
0x18f40b000 - 0x18f418fff libcommonCrypto.dylib (60178.120.3) <146E6A52-3060-32A1-9119-C3D6F8B5C57B> /usr/lib/system/libcommonCrypto.dylib
0x18f419000 - 0x18f423fff libunwind.dylib (201) <2A01EF92-F92D-35F7-B638-8CBC6896DCAA> /usr/lib/system/libunwind.dylib
0x18f424000 - 0x18f42bfff liboah.dylib (203.58) <6802DEC1-9ED5-3667-BFE0-3BDDE8BB40E1> /usr/lib/liboah.dylib
0x18f42c000 - 0x18f434fff libcopyfile.dylib (173.40.2) <8477DD43-56AA-3422-BF23-4ADC7B98462F> /usr/lib/system/libcopyfile.dylib
0x18f435000 - 0x18f438fff libcompiler_rt.dylib (102.2) <50E8F23E-3E63-31BF-BFC3-EE75D281B151> /usr/lib/system/libcompiler_rt.dylib
0x18f439000 - 0x18f43bfff libsystem_collections.dylib (1439.141.1) /usr/lib/system/libsystem_collections.dylib
0x18f43c000 - 0x18f43efff libsystem_secinit.dylib (87.60.1) <836B23E3-DF08-31C8-98AD-4A9B12A4B404> /usr/lib/system/libsystem_secinit.dylib
0x18f43f000 - 0x18f441fff libremovefile.dylib (49.120.1) <687A6E36-0460-30BC-A675-7F83059AE2D9> /usr/lib/system/libremovefile.dylib
0x18f442000 - 0x18f442fff libkeymgr.dylib (31) /usr/lib/system/libkeymgr.dylib
0x18f443000 - 0x18f44bfff libsystem_dnssd.dylib (1310.140.1) /usr/lib/system/libsystem_dnssd.dylib
0x18f44c000 - 0x18f451fff libcache.dylib (83) <2EA812B3-0565-35FA-BF54-DF98EF3DB5DE> /usr/lib/system/libcache.dylib
0x18f452000 - 0x18f453fff libSystem.B.dylib (1292.120.1) <1E75FCDF-2357-30FE-AAAD-5290BA722464> /usr/lib/libSystem.B.dylib
0x18f454000 - 0x18f457fff libfakelink.dylib (3) /usr/lib/libfakelink.dylib
0x18f458000 - 0x18f458fff com.apple.SoftLinking (1.0 - 1) /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking
0x18f459000 - 0x18f494fff libpcap.A.dylib (98.100.3) <842B3358-71DB-3219-9768-0A013DC08CEC> /usr/lib/libpcap.A.dylib
0x18f495000 - 0x18f58afff libiconv.2.dylib (59) <99E6BB0C-73CD-3239-942A-F6DD9325B90A> /usr/lib/libiconv.2.dylib
0x18f58b000 - 0x18f59dfff libcmph.dylib (8) <7E0DAF54-070D-3D42-B362-94B9138589CF> /usr/lib/libcmph.dylib
0x18f59e000 - 0x18f60efff libarchive.2.dylib (83.100.2) <5F23CB65-ACED-364E-BD1D-E00247CD6FC7> /usr/lib/libarchive.2.dylib
0x18f60f000 - 0x18f67ffff com.apple.SearchKit (1.4.1 - 1.4.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x18f680000 - 0x18f681fff libThaiTokenizer.dylib (3) /usr/lib/libThaiTokenizer.dylib
0x18f682000 - 0x18f6a6fff com.apple.applesauce (1.0 - 16.28) /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
0x18f6a7000 - 0x18f6bdfff libapple_nghttp2.dylib (1.41) <06587250-EE7C-36A1-8A78-C8409EB2ECCD> /usr/lib/libapple_nghttp2.dylib
0x18f6be000 - 0x18f6d0fff libSparseBLAS.dylib (1336.140.1) <1FF666F8-7B71-378D-A890-A29032EC6AA4> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
0x18f6d1000 - 0x18f6d2fff com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
0x18f6d3000 - 0x18f6d7fff libpam.2.dylib (28.40.1) <8662B90D-5137-3BCC-BEC6-F7FEB6BD8F01> /usr/lib/libpam.2.dylib
0x18f6d8000 - 0x18f6f6fff libcompression.dylib (96.120.1) <6BCBE6BF-0CDD-3059-BBB9-45AF92D7EFA7> /usr/lib/libcompression.dylib
0x18f6f7000 - 0x18f6fbfff libQuadrature.dylib (7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
0x18f6fc000 - 0x18fbb8fff libLAPACK.dylib (1336.140.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x18fbb9000 - 0x18fc0bfff com.apple.DictionaryServices (1.2 - 341) <2845ABAE-8FCB-38B0-8F57-72EB3A67CF63> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x18fc0c000 - 0x18fc24fff liblzma.5.dylib (16) <20EEA2A7-C813-3D16-879E-A21431E7E72D> /usr/lib/liblzma.5.dylib
0x18fc25000 - 0x18fc26fff libcoretls_cfhelpers.dylib (169.100.1) /usr/lib/libcoretls_cfhelpers.dylib
0x18fc27000 - 0x18fd0bfff com.apple.APFS (1677.141.2 - 1677.141.2) /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
0x18fd0c000 - 0x18fd19fff libxar.1.dylib (452) /usr/lib/libxar.1.dylib
0x18fd1a000 - 0x18fd1dfff libutil.dylib (58.40.2) <1650ED1F-F6F6-3018-8F7E-151162BF10E6> /usr/lib/libutil.dylib
0x18fd1e000 - 0x18fd47fff libxslt.1.dylib (17.6) <0ADB40D6-F173-3865-A4DE-153889696ED5> /usr/lib/libxslt.1.dylib
0x18fd48000 - 0x18fd52fff libChineseTokenizer.dylib (37.1) <0D3892E7-FEA4-3161-BAD5-26B593210AA1> /usr/lib/libChineseTokenizer.dylib
0x18fd53000 - 0x18fdc2fff libvMisc.dylib (760.100.3) <3ABB75F1-89E8-329F-9BF4-328E2E59B27F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x18fdc3000 - 0x18fe54fff libate.dylib (3.0.6) <5D22D187-0024-3E0C-86F7-A5D4258D2101> /usr/lib/libate.dylib
0x18fe55000 - 0x18fe5cfff libIOReport.dylib (64.100.1) /usr/lib/libIOReport.dylib
0x18ffe4000 - 0x19002ffff com.apple.AppleVAFramework (6.1.3 - 6.1.3) /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA
0x190030000 - 0x19004afff libexpat.1.dylib (26.141.1) /usr/lib/libexpat.1.dylib
0x19004b000 - 0x190053fff libheimdal-asn1.dylib (597.140.2) <382A3FF4-A00D-3E8A-8C7D-C4A511BBC2E3> /usr/lib/libheimdal-asn1.dylib
0x1900cb000 - 0x19016dfff com.apple.MediaExperience (1.0 - 1) /System/Library/PrivateFrameworks/MediaExperience.framework/Versions/A/MediaExperience
0x19016e000 - 0x190194fff com.apple.persistentconnection (1.0 - 1.0) <5FD46B59-5D62-366A-80F1-CDE2E8F48555> /System/Library/PrivateFrameworks/PersistentConnection.framework/Versions/A/PersistentConnection
0x190195000 - 0x1901a2fff com.apple.GraphVisualizer (1.0 - 100.1) <3467C846-8CD3-3013-B4A8-827D37F7726C> /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer
0x1901a3000 - 0x1905b5fff com.apple.vision.FaceCore (4.3.2 - 4.3.2) <0659DE86-99CF-33AB-A4AF-858F1E940A85> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
0x1905b6000 - 0x1905f5fff com.apple.OTSVG (1.0 - 677.6.0.2) /System/Library/PrivateFrameworks/OTSVG.framework/Versions/A/OTSVG
0x1905f6000 - 0x1905fdfff com.apple.xpc.AppServerSupport (1.0 - 2038.120.1) /System/Library/PrivateFrameworks/AppServerSupport.framework/Versions/A/AppServerSupport
0x1905fe000 - 0x19060cfff libhvf.dylib (1.0 - $[CURRENT_PROJECT_VERSION]) <8346C962-1506-3A3F-A6C7-BA096F2DE20A> /System/Library/PrivateFrameworks/FontServices.framework/libhvf.dylib
0x19060d000 - 0x190613fff libspindump.dylib (295.2) <2BE38B0F-B9B3-3952-ADA0-A87B9B18E3AE> /usr/lib/libspindump.dylib
0x190614000 - 0x1906c6fff com.apple.Heimdal (4.0 - 2.0) /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
0x19085b000 - 0x190895fff com.apple.bom (14.0 - 235) <0F27FA57-F455-30C3-9B19-1111F24ABB6C> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x190896000 - 0x1908d9fff com.apple.AppleJPEG (1.0 - 1) <9B47B12A-B064-3054-B702-203A0E18193B> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
0x1908da000 - 0x1909bbfff libJP2.dylib (2130.7.3) <239163F1-8926-3DB9-A74A-BA78CE654923> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x1909bc000 - 0x1909bffff com.apple.WatchdogClient.framework (1.0 - 98.120.2) /System/Library/PrivateFrameworks/WatchdogClient.framework/Versions/A/WatchdogClient
0x1909c0000 - 0x1909f8fff com.apple.MultitouchSupport.framework (4440.3 - 4440.3) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x1909f9000 - 0x190b29fff com.apple.VideoToolbox (1.0 - 2780.10) /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
0x190b2a000 - 0x190b5cfff libAudioToolboxUtility.dylib (1181.72) /usr/lib/libAudioToolboxUtility.dylib
0x190b5d000 - 0x190b7efff libPng.dylib (2130.7.3) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x190b7f000 - 0x190bdbfff libTIFF.dylib (2130.7.3) <6FF8682B-E15C-3F53-BCAA-3F7506D001B4> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x190bdc000 - 0x190bfafff com.apple.IOPresentment (58 - 37) /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment
0x190bfb000 - 0x190bfffff com.apple.GPUWrangler (6.3.5 - 6.3.5) /System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler
0x190c00000 - 0x190c02fff libRadiance.dylib (2130.7.3) <74D02264-14F4-3558-BE8E-EA3D89394B68> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x190c03000 - 0x190c08fff com.apple.DSExternalDisplay (3.1 - 380) /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay
0x190c09000 - 0x190c29fff libJPEG.dylib (2130.7.3) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x190c2a000 - 0x190c59fff com.apple.ATSUI (1.0 - 1) <0346055A-5ACC-3E05-86F5-2C3D2E75B12E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATSUI.framework/Versions/A/ATSUI
0x190c5a000 - 0x190c5efff libGIF.dylib (2130.7.3) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x190c5f000 - 0x190c68fff com.apple.CMCaptureCore (1.0 - 82.6) <4830FC37-AB0B-361A-B192-0DE38613FB9E> /System/Library/PrivateFrameworks/CMCaptureCore.framework/Versions/A/CMCaptureCore
0x190c69000 - 0x190cb0fff com.apple.print.framework.PrintCore (16.1 - 531.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x190cb1000 - 0x190d64fff com.apple.TextureIO (3.10.9 - 3.10.9) <4B849AA8-4457-3905-B4AD-AA2C70DECD56> /System/Library/PrivateFrameworks/TextureIO.framework/Versions/A/TextureIO
0x190d65000 - 0x190d6dfff com.apple.InternationalSupport (1.0 - 61.1) /System/Library/PrivateFrameworks/InternationalSupport.framework/Versions/A/InternationalSupport
0x191b25000 - 0x191b5afff libSessionUtility.dylib (76.69) /System/Library/PrivateFrameworks/AudioSession.framework/libSessionUtility.dylib
0x191b5b000 - 0x191c83fff com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <22835349-6C44-3EA8-AA41-AA43856A11D2> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x191c84000 - 0x191cebfff com.apple.audio.AudioSession (1.0 - 76.69) <5FB74E3B-F200-3FC8-AF91-9438E8C79CB6> /System/Library/PrivateFrameworks/AudioSession.framework/Versions/A/AudioSession
0x191cec000 - 0x191cfefff libAudioStatistics.dylib (27.64) <156A7CA4-9A1D-3FEE-AAFC-849D330FE9D4> /usr/lib/libAudioStatistics.dylib
0x191cff000 - 0x191d12fff com.apple.speech.synthesis.framework (9.0.66 - 9.0.66) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x191d13000 - 0x191d81fff com.apple.ApplicationServices.ATS (377 - 516) <71316EFD-FE97-3EE6-9997-CBC11F453539> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x191d82000 - 0x191d9afff libresolv.9.dylib (68) <287B0B90-55FD-3227-B5FD-256464AA2496> /usr/lib/libresolv.9.dylib
0x191ec7000 - 0x191fa6fff libSMC.dylib (20) /usr/lib/libSMC.dylib
0x191fa7000 - 0x192004fff libcups.2.dylib (494.3) <0B99F7B0-2190-3D6B-BCF1-C67C8BC6128F> /usr/lib/libcups.2.dylib
0x192005000 - 0x192018fff com.apple.LangAnalysis (1.7.0 - 254) <0DA1AFE0-521E-3CF9-B75C-530303B6AC64> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x192019000 - 0x192025fff com.apple.NetAuth (6.2 - 6.2) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
0x192026000 - 0x19202dfff com.apple.ColorSyncLegacy (4.13.0 - 1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy
0x19202e000 - 0x192039fff com.apple.QD (4.0 - 416) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x19203a000 - 0x19262afff com.apple.audio.AudioResourceArbitration (1.0 - 1) <299FA1A8-2287-35D6-BAC7-9DE3C1D74667> /System/Library/PrivateFrameworks/AudioResourceArbitration.framework/Versions/A/AudioResourceArbitration
0x19262b000 - 0x192636fff com.apple.perfdata (1.0 - 67.40.1) /System/Library/PrivateFrameworks/perfdata.framework/Versions/A/perfdata
0x192637000 - 0x192644fff libperfcheck.dylib (41) <5006BCAD-219C-31BF-B6DC-FE5D93D95D8A> /usr/lib/libperfcheck.dylib
0x192645000 - 0x192655fff com.apple.Kerberos (3.0 - 1) <3E11D5D5-8F87-3FB4-94BB-CA4333C4C248> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x192656000 - 0x19269dfff com.apple.GSS (4.0 - 2.0) /System/Library/Frameworks/GSS.framework/Versions/A/GSS
0x19269e000 - 0x1926adfff com.apple.CommonAuth (4.0 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
0x192871000 - 0x192871fff liblaunch.dylib (2038.120.1) /usr/lib/system/liblaunch.dylib
0x194adf000 - 0x194aeefff com.apple.SpeechRecognitionCore (6.1.25 - 6.1.25) /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
0x194aef000 - 0x194af6fff com.apple.speech.recognition.framework (6.0.3 - 6.0.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x194d25000 - 0x194d25fff libsystem_product_info_filter.dylib (8.40.1) <14136F56-3690-3346-90A0-31FC34DF3E1B> /usr/lib/system/libsystem_product_info_filter.dylib
0x194df8000 - 0x194df8fff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <372F4BDE-9AA6-3832-A25D-585683D7EFBA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x194e1a000 - 0x194e1afff com.apple.CoreServices (1122.44 - 1122.44) <7CA890C2-3B87-3C10-B438-1AEB34A9E1BE> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x194fd7000 - 0x194fd7fff com.apple.Accelerate (1.11 - Accelerate 1.11) <6CA149E0-61A2-3868-9ADF-A4AA815F3D24> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x1979f7000 - 0x1979fafff com.apple.help (1.3.8 - 71) <0FB6AD05-1F2D-34C4-B03D-881234E55989> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x197c41000 - 0x197c41fff com.apple.ApplicationServices (48 - 50) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x197f31000 - 0x197f31fff libHeimdalProxy.dylib (79) <7CC40013-93B4-3E9C-A96D-D2ABB02E9D2E> /System/Library/Frameworks/Kerberos.framework/Versions/A/Libraries/libHeimdalProxy.dylib
0x198946000 - 0x19894cfff com.apple.ASEProcessing (1.26.0 - 1.26.0) <3D723C7F-BCD1-30AA-995E-A8296550F6A9> /System/Library/PrivateFrameworks/ASEProcessing.framework/Versions/A/ASEProcessing
0x199e0c000 - 0x199e0ffff com.apple.IOSurfaceAccelerator (1.0.0 - 1.0.0) <8891C31D-C3A6-30B5-9CE8-DA5421F36718> /System/Library/PrivateFrameworks/IOSurfaceAccelerator.framework/Versions/A/IOSurfaceAccelerator
0x19ae87000 - 0x19aeaefff com.apple.openscripting (1.7 - 190) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x19aeaf000 - 0x19aeb2fff com.apple.securityhi (9.0 - 55008) <36AFAF34-E6AC-3A13-BE53-97B344D6839A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x19aeb3000 - 0x19aeb6fff com.apple.ink.framework (10.15 - 227) <42ED5861-80C5-34B4-97BD-5676C9C4A58F> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x19aeb7000 - 0x19aebafff com.apple.CommonPanels (1.2.6 - 101) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x19aebb000 - 0x19aec2fff com.apple.ImageCapture (1711.5.2 - 1711.5.2) <90AA1C4C-ABAB-375C-969C-15783F4EB489> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x1a118b000 - 0x1a118efff com.apple.print.framework.Print (15 - 271) <339D8E6D-4F7E-3B53-9787-CFBDFD603C8C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x1a118f000 - 0x1a1192fff com.apple.Carbon (160 - 164) <9FAD7120-CD44-3768-BE51-530E42233E02> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x1a1459000 - 0x1a1475fff com.apple.private.SystemPolicy (1.0 - 1) /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy
0x1a1de6000 - 0x1a1df8fff libmis.dylib (274.140.2) <9AB0F36D-3AF3-3802-A2DA-C7C682498655> /usr/lib/libmis.dylib
0x1a5445000 - 0x1a5475fff libncurses.5.4.dylib (57) <0300C82B-7239-32FD-8A28-45A25D89EAAC> /usr/lib/libncurses.5.4.dylib
0x1badbc000 - 0x1badd9fff libedit.3.dylib (55) <9E2090B7-408E-3147-A436-0DC2B69D99C4> /usr/lib/libedit.3.dylib
0x1c7a6c000 - 0x1c7a72fff libCoreFSCache.dylib (200.11) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
0x1c7a73000 - 0x1c7a78fff libCoreVMClient.dylib (200.11) <1A2DD0B4-1C56-3C7B-B5B7-06AF9F73D3D7> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x1c7a79000 - 0x1c7a88fff com.apple.opengl (18.5.9 - 18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x1c7a89000 - 0x1c7a8bfff libCVMSPluginSupport.dylib (18.5.9) <75509F55-33A5-3A15-8A37-6EE18C772015> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
0x1c7a8c000 - 0x1c7a94fff libGFXShared.dylib (18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x1c7a95000 - 0x1c7acdfff libGLImage.dylib (18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x1c7ace000 - 0x1c7b06fff libGLU.dylib (18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x1c7c74000 - 0x1c7c7efff libGL.dylib (18.5.9) <6B5127DA-3097-3979-BF12-0DC83771C8D0> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x1c7e0f000 - 0x1c7e6efff com.apple.opencl (4.6 - 4.6) <95665FCE-A143-3B7B-B011-37AC651C03A2> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x1d91d8000 - 0x1d920ffff libiodbc.2.dylib (42.6) /usr/lib/libiodbc.2.dylib
0x1d9210000 - 0x1d921bfff libiodbcinst.2.dylib (42.6) /usr/lib/libiodbcinst.2.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=641.8M resident=0K(0%) swapped_out_or_unallocated=641.8M(100%)
Writable regions: Total=466.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=466.0M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 32K 1
MALLOC 87.1M 23
MALLOC guard page 96K 5
MALLOC_MEDIUM (reserved) 360.0M 3 reserved VM address space (unallocated)
STACK GUARD 16K 1
Stack 16.0M 1
VM_ALLOCATE 1.0G 11
__AUTH 473K 103
__AUTH_CONST 6820K 239
__DATA 4691K 242
__DATA_CONST 7458K 250
__DATA_DIRTY 356K 84
__FONT_DATA 4K 1
__LINKEDIT 492.2M 17
__OBJC_CONST 701K 80
__OBJC_RO 75.1M 1
__OBJC_RW 2576K 1
__TEXT 149.6M 266
__UNICODE 588K 1
shared memory 32K 2
=========== ======= =======
TOTAL 2.2G 1332
TOTAL, minus reserved VM space 1.8G 1332

Model: MacBookAir10,1, BootROM 6723.140.2, proc 8:4:4 processors, 16 GB, SMC
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: LPDDR4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Aug 18 2021 22:48:53 version 18.50.40.11.7.8.123 FWID 01-3ed0e3a2
Bluetooth: Version 8.0.5d7, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Network Service: USB 10/100/1000 LAN, Ethernet, en7
Network Service: Thunderbolt Ethernet Slot 1, Ethernet, en6
USB Device: USB 3.1 Bus
USB Device: USB 3.1 Bus
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Bus: MacBook Air, Apple Inc.

@mitchellpalmer
Copy link

I am also getting the above error. Anyone got any hints for dealing with it?

@v-chojas
Copy link
Contributor

I don't know what you mean by "above error". Please be specific and provide as much detail as you can.

@mariusdkm
Copy link

I think the error by @hxmwr is because the ODBC Microsoft Library is for x86_64 and not arm64, this will result in a literal crash of the python program.
Try using FreeTDS as a driver instead.
I am using mac ports and just installed FreeTDS and then pyodbc from pip.
I wrote it all down here.
When installing with homebrew I think everything should work like described here

@michaelbdavidson7
Copy link

michaelbdavidson7 commented Apr 7, 2022

If the export trick isn't working, you could be using the wrong export path

To get your export path run brew info unixodbc which should give you something like this:

unixodbc: stable 2.3.9
ODBC 3 connectivity for UNIX
http://www.unixodbc.org/
Conflicts with:
  libiodbc (because both install `odbcinst.h`)
  virtuoso (because both install `isql` binaries)
/opt/homebrew/Cellar/unixodbc/2.3.9_1 (46 files, 2.3MB) *
  Poured from bottle on 2022-04-06 at 16:25:27
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/unixodbc.rb
License: LGPL-2.1-or-later
==> Dependencies
Required: libtool ✔
==> Analytics
install: 71,934 (30 days), 209,218 (90 days), 855,797 (365 days)
install-on-request: 4,846 (30 days), 15,146 (90 days), 80,542 (365 days)
build-error: 0 (30 days)

That /opt/homebrew/Cellar/unixodbc/2.3.9_1 bit is what you want your export path to look like, eg:

export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9_1/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9_1/include"

What wasn't workign for me above was that extra _1 in the verison number, which the export commands above didn't have.

@hanleybrand
Copy link

I spent the better part of a day figuring this out so far -- the main change from what's above is adding -L/opt/homebrew/lib to $LDFLAGS, which fixed the ld: library not found for -lodbc error in my case

It looks like in many but not all cases the following will work, because lots of formula link their libs & includes to these directories (e.g. I couldn't see that openssl or FreeTDS do, but maybe I missed it) -- I tested installingpyodbc with the following, and it worked (caveat: there's a lot of stuff in the hombrew lib/include dirs, so it might need the FreeTDS or openssl stuff, I dunno):

brew install unixodbc
export LDFLAGS="-L/opt/homebrew/lib"
export CFLAGS="-I/opt/homebrew/include"
export CPPFLAGS="-I/opt/homebrew/include"
pip install pyodbc

But if you want to collect 'em all, here's the summary/aggregation of what I've done in since yesterday

brew install unixodbc freetds openssl
export LDFLAGS="-L/opt/homebrew/lib  -L/opt/homebrew/Cellar/unixodbc/2.3.11/include -L/opt/homebrew/opt/freetds/lib -L/opt/homebrew/opt/openssl@3/lib"
export CFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.11/include -I/opt/homebrew/opt/freetds/include"
export CPPFLAGS="-I/opt/homebrew/include -I/opt/homebrew/Cellar/unixodbc/2.3.11/include -I/opt/homebrew/opt/openssl@3/include" 
pip3 install pyodbc  

@tboddyspargo
Copy link

Hi, all 👋 !

I really appreciate the great workarounds listed here and all the shared experiences. The LDFLAGS, and CPPFLAGS solution was successful in my testing, but it's not something that I will be prescribing more widely to my team. Instead we're continuing to use linux/amd64 platform containers running in docker with qemu emulation.

I was just wondering if there is any plan and timeline for releasing wheels for arm64 linux and macos on PyPi? I expect there's a lot more interest in such releases compared to when the issue was first opened.

@bujoriosif
Copy link

To fix the new homebrew dir path on mac m1:

i just created a symlink from new homebrew dir to the old one $ sudo ln /opt/homebrew/include/* /usr/local/include/ $ sudo ln /opt/homebrew/lib/* /usr/local/lib/

This fixed it for me. I had the error with sql.h while trying to start a virtual environment with pyodbc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests