Install pymssql for Mac OS

  1. Install Python runtime and pip package manager
    a. Go to python.org
    b. Click on the appropriate Mac installer pkg link.
    c. Once downloaded run the pkg to install Python runtime

  2. Open terminal

  3. Install Homebrew package manager

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"  
  1. Install FreeTDS module
brew install FreeTDS  
  1. Install pymssql module

I’ve been looking for this method all day, ‘sudo – H’ is a required:

sudo -H pip install pymssql

via: https://docs.microsoft.com/en-us/sql/connect/python/pymssql/step-1-configure-development-environment-for-pymssql-python-development?view=sql-server-ver15