Reputation: 661
I'm having trouble installing pyodbc on El Capitan. I have another virtualenv which was created during Yosemite days that has pyodbc.
I am installing pyodbc through the following command:
pip install --global-option=build_ext --global-option="-I/usr/local/include" --allow-external pyodbc --allow-unverified pyodbc pyodbc
It errs out saying it cannot find odbc dynamic library.
ld: library not found for -lodbc
The version of python I'm using is python 2.7.10(but has similar problems installing in python 2.6.9 too)
Upvotes: 0
Views: 385
Reputation: 386
pyodbc now supplies binary wheels for macOS, for Python 2.7 and 3.4+, so no compilation is necessary. Note that these are built with unixODBC, not iODBC, however.
Upvotes: 1
Reputation: 661
Add /usr/local/lib to compiler dynamic library path
pip install --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" --allow-external pyodbc --allow-unverified pyodbc pyodbc
Upvotes: 3