mac - pip install pymssql error

前端 未结 7 825
执笔经年
执笔经年 2020-12-05 02:40

I use Mac (OS X 10.11.5). I want to install module pymssql for python. In Terminal.app, I input sudo -H pip install pymssql, pip

相关标签:
7条回答
  • 2020-12-05 02:51

    The top voted solution did not work for me as brew did not link the older version of freetds on its own. I did this to solve the problem:

    brew unlink freetds; 
    brew install freetds@0.91;
    brew link --force freetds@0.91
    
    0 讨论(0)
  • 2020-12-05 02:58

    All the solutions above work well . Just one word of caution , the setup.py for pymssql pip install pymssql expects that Homebrew has installed Freetds at /sw

    if sys.platform == 'darwin':
        fink = '/sw'
    

    This was not the case in my machine so I had to use the work around here :

    1. Manually download the .tar file for pymssql
    2. change this in setup.py file to point fink to freetds location
    3. Then run python setup.py install
    0 讨论(0)
  • 2020-12-05 03:01

    I was able to work around this by reverting to an older version of FreeTDS through Homebrew before running the pip install.

    brew unlink freetds; brew install homebrew/versions/freetds091
    

    The solution was found by andrewmwhite at: https://github.com/pymssql/pymssql/issues/432

    0 讨论(0)
  • 2020-12-05 03:05

    This worked for me on mac:

    pip install cython
    

    then

    pip install git+https://github.com/pymssql/pymssql.git
    
    0 讨论(0)
  • 2020-12-05 03:08

    Found Detailed and simple answer with step by step installation of pymssql on http://gree2.github.io/python/setup/2017/04/19/python-instal-pymssql-on-mac.

    1. brew unlink freetds; brew install homebrew/core/freetds091
    2. brew link --force freetds@0.91
    3. pip install pymssql
    0 讨论(0)
  • 2020-12-05 03:09

    "brew install homebrew/python/pymssql" also worked but will install older 2.1.1 as of today.

    0 讨论(0)
提交回复
热议问题