Skip to content

Instantly share code, notes, and snippets.

@isc-rsingh
Created October 4, 2020 03:04
Show Gist options
  • Save isc-rsingh/4db02545c03a81630d331183b77b432c to your computer and use it in GitHub Desktop.
Save isc-rsingh/4db02545c03a81630d331183b77b432c to your computer and use it in GitHub Desktop.
Get ODBC, PyODBC up and running for InterSystems IRIS

PyODBC installation instructions

Install ODBC

  • Windows: no installation necessary
  • Mac
    1. Run brew update
    2. Run brew install unixodbc
  • Linux
    1. Run apt-get update
    2. Run apt-cache search iodbc
    3. Run apt-get install -y unixodbc-dev iodbc

Install PyODBC

  • Windows
    1. Install Python and pip
    2. Run pip install pyodbc
  • Mac
    1. Run pip install pip==7.1.2
    2. Run pip install --upgrade --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" --allow-external pyodbc --allow-unverified pyodbc pyodbc
  • Linux
    1. Run apt-get install python3-pip
    2. Run pip install --upgrade --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" pyodbc

Install InterSystems PyODBC drivers

  • git clone http://github.com/intersystems/quickstarts-python
  • cd Solutions
  • Windows
  • Mac
    • Change paths in pyodbc_wheel/mac/odbcinst.ini from relative to full
    • Run odbcinst -i -d -f pyodbc_wheel/mac/odbcinst.ini
  • Linux
    • Change paths in pyodbc_wheel/linux/odbcinst.ini from relative to full
    • Run odbcinst -i -d -f pyodbc_wheel/linux/odbcinst.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment