ERROR: Could not build wheels for pymssql, which is required to install pyproject.toml-based projects In Mac M1

On trying loads of solutions for fixing this issue, Seems like something worked out for me.
I`m providing the code below for solving this issue.

Important Note: Change the path as per your system.

1. brew install freetds
2. brew install openssl
3. export LDFLAGS="-L/opt/homebrew/Cellar/freetds/1.3.3/lib -L/opt/homebrew/Cellar/[email protected]/1.1.1l_1/lib"
4. export CFLAGS="-I/opt/homebrew/Cellar/freetds/1.3.3/include" 
5. pip install pymssql

Just run the above commands & it should solve your issue, as it worked out for me.


Running the following commands fixed my issue

$ brew install freetds openssl
$ echo 'export LDFLAGS="-L/opt/homebrew/opt/freetds/lib -L/opt/homebrew/opt/openssl@3/lib"' >> ~/.zshrc
$ echo 'export CFLAGS="-I/opt/homebrew/opt/freetds/include"' >> ~/.zshrc
$ echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"' >> ~/.zshrc
$ source ~/.zshrc
$ pip3 install pymssql