How to install pymssql on windows with python 2.7?

一世执手 提交于 2019-12-18 11:53:29

问题


It seems that there are no such binaries yet. There is an issue on googlecode: http://code.google.com/p/pymssql/issues/detail?id=12 but i cannot figure out what to do with those files provided.


回答1:


You may also get pymssql2.7 library from this unofficial extensions library

http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql




回答2:


If you have pip install:

pip install pymssql

To install pip (trust me its very helpful):

  1. Download and run this python script (as admin):

    https://bootstrap.pypa.io/get-pip.py




回答3:


Extract the contents into the Python27\Lib\site-packages directory.




回答4:


Combining YOU and David Huang's answers will bring success; here are some further notes that may help a beginner:

Be sure to download the package that matches the bitness of your windows and also matches the version of Python you are running. I noticed on the pymssql wiki page a note about x64 not being available on Windows so test well if you choose those packages.

It may feel a little sketchy when you notice Christoph Gohlke packages are all exe's. I used WinRAR to open the self-extractor. Inside the archive is a PLATLIB folder which itself contains two files and a folder: _mssql.pyd, pymssql.pyd, and pymssql-N.N.N-pyN.N.egg-info. These two files and the pymssql-... folder are what needs extracting into ...\Lib\site-packages.



来源:https://stackoverflow.com/questions/4666290/how-to-install-pymssql-on-windows-with-python-2-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!