As you noticed OSX Mavericks dropped sql headers that are required for PyODBC compilation.
Following these steps allowed me to install PyODBC:
- Make sure you have iODBC library installed (http://www.iodbc.org/)
- Download and extract iODBC sources
- Run
pip install --no-install pyodbc
cd [VIRTUAL_ENV]/build/pyodbc
- Run
python setup.py build_ext --include-dirs=[LIBIODBC_SOURCES]/include/
Run pip install --no-download pyodbc
:
Installing collected packages: pyodbc
Running setup.py install for pyodbc
warning: no files found matching 'tests/*'
Successfully installed pyodbc
Cleaning up...
I could as well copy the files under [libiodbc_sources]/include/
to my /usr/include
and just run pip install pyodbc
, but I didn't want to add files manually to system folders.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…