Форум сайта python.su
Сейчас обратил внимание, что у меня стоит Microsoft SQL 2005 и Visual Studio 2005, которая идет с ним. Ставил я pymssql из бинарника. Это может быть причиной сбоя?
порпобовал поставить из сирцов, вот что получил:
Setup.py is unable to find SQL 2000 developer tools include directory.Выходит, что он ни SQL ни Visual Studio не видит?
Setup.py is unable to find SQL 2000 developer tools library directory.
Either the developer tools package is not installed or you have insufficient
permissions to read the files. Please make sure you've got administrator
rights. Setup.py will try some generic paths.
running install
running build
running build_py
creating build
creating build\lib.win32-2.5
copying pymssql.py -> build\lib.win32-2.5
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing “-c mingw32” to setup.py.
Отредактировано (Окт. 4, 2007 12:23:21)
Офлайн
wellу тебя тоже дебиан?
то же самое выдает
Офлайн
pythonwinСори, не прочитал выше, у меня таже версия pymssqlwellу тебя тоже дебиан?
то же самое выдает
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) on win32
>>> import pymssql
>>> pymssql.__version__
'0.8.0'
Отредактировано (Окт. 4, 2007 13:07:00)
Офлайн
А можно как-то коннектиться к базе, чтобы не нужны были дугие либы и т.д. (типа модудя MySQL-python - поставил и проблем не занешь :))?
Офлайн
wellпопробуй поставить из http://downloads.sourceforge.net/pymssql/pymssql-0.8.0.win32-py2.5.exe?modtime=1159101209&big_mirror=0
А можно как-то коннектиться к базе, чтобы не нужны были дугие либы и т.д. (типа модудя MySQL-python - поставил и проблем не занешь :))?
* Python 2.4 or newer (the code requires datetime module, and the API functions to manipulate datetime, that's why it won't run on Python earlier than 2.4, thanks Jakub Labath for pointing that out.)http://support.microsoft.com/?kbid=916287
* Linux, *nix and Mac OS X: FreeTDS 0.63 or newer.
NOTE: FreeTDS must be configured with –enable-msdblib to return correct dates! See README.freetds for details.
* Windows: pymssql is equipped with ntwdblib.dll version 2000.80.2087.0 distributed by MS in SQL 2000 post-SP4 hotfix - see KB916287, which supports connecting to MS SQL 2000 and 2005 servers. This library is redistributable – see REDIST.txt in SQL Server 2000 installation package, or in SQL Server 2000 SP4 installation package.
* You don't have to install full MS SQL Client Tools unless you want to use advanced client configuration tools available in that package.
* NOTE: pymssql doesn't invalidate the requirement for an SQL Client Access Licence for every host you want to run it on, be it Windows or *nix, if your SQL Server is licenced per user or per device connected.
Офлайн
.. а ещё варианты ceODBC, pyodbc, mxODBC
Офлайн
а как можно общаться с MsSQL через такое?:
from win32com.client import Dispatch con = Dispatch(r'ADODB.Connection')
Офлайн
наверное можно, но думаю mxODBC будет быстрее
Офлайн
pythonwinустановил с сайта: http://www.egenix.com/products/python/mxODBC/, нашел пример: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/144183. Жалуется, что не находит модуль:
наверное можно, но думаю mxODBC будет быстрее
Traceback (most recent call last):
File “<string>”, line 74, in run_nodebug
File “<Module1>”, line 1, in <module>
ImportError: No module named mx.ODBC.Windows
Офлайн
попробуй просто в интерпритаторе питона
import mx.ODBC
import mx.ODBC.Windows
Офлайн