Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install pymssql

Tags:

python

macos

I was trying to install pymssql .For this I use pip and installed it using a virtual environment according to instructions mentioned here But when I say

(my_new_env)tmp> pip install pymssql

I see the following errors :

Downloading pymssql-2.0.0b1-dev-20111019.tar.gz (5.0Mb): 5.0Mb downloaded Running setup.py egg_info for package pymssql
Traceback (most recent call last): File "", line 14, in File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in from Cython.Distutils import build_ext as _build_ext ImportError: No module named Cython.Distutils Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 14, in

File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in

from Cython.Distutils import build_ext as _build_ext

ImportError: No module named Cython.Distutils

I googled a bit for this issue.Do I have to install Cython or something? If so some instructions in this direction would be helpful. Thanks!

like image 479
Manish Avatar asked Apr 11 '12 00:04

Manish


People also ask

What is Pymssql in Python?

A simple database interface for Python that builds on top of FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft SQL Server. The 2. x branch of pymssql is built on the latest release of FreeTDS which removes many of the limitations found with older FreeTDS versions and the 1. x branch.


1 Answers

You need to install Cython. It is available on PyPi so you may be able to do:

pip install cython

That may not work on windows (I really don't know), but if it doesn't check out this page: http://cython.org/#download

On that page you will see a link to windows installers. Pick the right one and you should be good to go.

like image 116
joshcartme Avatar answered Oct 14 '22 21:10

joshcartme