Skip to content
Advertisement

ImportError: No module named _mssql

I’m running Python 2.7.2 on OS 10.8.5

Trying to use pymssql, but I get the following error:

JavaScript

I’ve tried installing mssql with pip and brew only to be told that there’s no package by that name. The docs don’t seem to cover installation.

EDIT:

When I try to pip install pymssql I get:

JavaScript

So I try brew install freetds and I get:

Warning: freetds-0.91 already installed, it's just not linked

which at least makes sense, but I don’t know how to fix it.

EDIT: I’ve linked it, so brew install freetds gives the message that it’s already installed, but pip install pymssql still gives the above error message.

EDIT:

JavaScript

Which now gives me the error:

JavaScript

Which I’ve had and fixed before but I don’t remember what I did.

EDIT:

OK, I’ve re-installed the 32-bit oracle and forced Python to run the 32-bit version (I think. I really have no idea what that last sentence means, but I think I’ve followed instructions correctly).

At any rate, here’s my error message now:

JavaScript

Advertisement

Answer

Ran these as root:

JavaScript

Then had to do:

JavaScript

Not sure if it will be successful but it’s at least a new error message.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement