Difference between revisions of "Installing Python pymssql Module"

From PeformIQ Upgrade
Jump to navigation Jump to search
Line 38: Line 38:
"Tried to install pymssql into cygwin python install using pip. There isn't currently any cygwin specific install instructions at http://pymssql.org but with a quick read it was obvious that pymssql has a dependency on FreeTDS that could be satisfied by installing FreeTDS package from the cygwin setup utility, however cygwin doesn't currently have any "freetds-dev" or "freetds-devel" package and it took quite a bit of head scratching to figure out the header files required by the pip build could be found in the the cygwin "libsybdb-devel" package"
"Tried to install pymssql into cygwin python install using pip. There isn't currently any cygwin specific install instructions at http://pymssql.org but with a quick read it was obvious that pymssql has a dependency on FreeTDS that could be satisfied by installing FreeTDS package from the cygwin setup utility, however cygwin doesn't currently have any "freetds-dev" or "freetds-devel" package and it took quite a bit of head scratching to figure out the header files required by the pip build could be found in the the cygwin "libsybdb-devel" package"


After installing the cygwin "freetds" and "libsybdb-devel" packages I ran the pip install again and it worked!
<pre>
$ pip install pymssql
Collecting pymssql
  Using cached pymssql-2.1.3.tar.gz
Installing collected packages: pymssql
  Running setup.py install for pymssql ... done
Successfully installed pymssql-2.1.3
</pre>


==Also==
==Also==

Revision as of 20:18, 7 November 2016

Problems

Cygwin

Looked like it installed OK.

$ pip install pymssql
Collecting pymssql
  Downloading pymssql-2.1.2.tar.gz (898kB)
    100% |████████████████████████████████| 901kB 134kB/s
Building wheels for collected packages: pymssql
  Running setup.py bdist_wheel for pymssql ... done
  Stored in directory: /home/aasdev/.cache/pip/wheels/08/df/03/0c92949cb5ecc9002cb965d135f1dec326cb7881f3e0bb80be
Successfully built pymssql
Installing collected packages: pymssql
Successfully installed pymssql-2.1.2

Windows

When I attempt to run a windows script which imports pymssql it fails:

Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
>>>

Notes

Found this somewhere:

"Tried to install pymssql into cygwin python install using pip. There isn't currently any cygwin specific install instructions at http://pymssql.org but with a quick read it was obvious that pymssql has a dependency on FreeTDS that could be satisfied by installing FreeTDS package from the cygwin setup utility, however cygwin doesn't currently have any "freetds-dev" or "freetds-devel" package and it took quite a bit of head scratching to figure out the header files required by the pip build could be found in the the cygwin "libsybdb-devel" package"

After installing the cygwin "freetds" and "libsybdb-devel" packages I ran the pip install again and it worked!

$ pip install pymssql
Collecting pymssql
  Using cached pymssql-2.1.3.tar.gz
Installing collected packages: pymssql
  Running setup.py install for pymssql ... done
Successfully installed pymssql-2.1.3

Also

https://pypi.python.org/pypi/pymssql/2.1.3#downloads