473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

MySql -python 1.2.1_p2 and visual c++ toolkit

Hi.

I'm trying to use Python 2.4 with MySql 5.0, but I'm having
installation problems.

I've tried to follow the following articles to install mysql-python
with the free visual c++ toolkit
http://mail.python.org/pipermail/pyt...er/255184.html
http://www.vrplumber.com/programming/mstoolkit/

but when I'm trying to install mysql-python, I get the following errors
:

C:\Python24\Lib\site-packages\MySQL-python-1.2.1_p2>python setup.py
install
running install
running build
running build_py
copying MySQLdb\release.py -> build\lib.win32-2.4\MySQLdb
running build_ext
building '_mysql' extension
C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe /c
/nologo /Ox /MD
/W3 /GX /DNDEBUG -Ic:\python24\include -Ic:\python24\PC /Tc_mysql.c
/Fobuild\te
mp.win32-2.4\Release\_mysql.obj -Dversion_info="(1,2,1,'final',2)"
-D__version__
="1.2.1_p2"
_mysql.c
c:\Python24\include\structmember.h(73) : warning C4005:
'WRITE_RESTRICTED' : mac
ro redefinition
C:\Program Files\Microsoft Platform SDK for Windows XP
SP2\Include\WinNT
..h(4727) : see previous definition of 'WRITE_RESTRICTED'
_mysql.c(1350) : warning C4018: '<' : signed/unsigned mismatch
_mysql.c(2804) : error C2015: too many characters in constant
_mysql.c(2804) : warning C4047: 'function' : 'const char *' differs in
levels of
indirection from 'int'
_mysql.c(2808) : error C2059: syntax error : 'bad suffix on number'
_mysql.c(2808) : error C2440: 'function' : cannot convert from 'double'
to 'cons
t char *'
_mysql.c(2808) : warning C4024: 'PyString_FromString' : different types
for form
al and actual parameter 1
_mysql.c(2808) : error C2143: syntax error : missing ')' before
'constant'
error: command '"C:\Program Files\Microsoft Visual C++ Toolkit
2003\bin\cl.exe"'
failed with exit status 2

It failes on the second line here :
if (PyDict_SetItemString(dict, "version_info",
PyRun_String(version_info, Py_eval_input,
dict, dict)))

As I'm new to python, I cant really figure out what the error is. The
C2015 error states that I'm trying to pass a char* where a char is
needed.
version_info is, as far as I can see, defined in metadata.cfg as
version_info: (1,2,1,'final',2)

Still this doeasnt tell me much..

I hope that someone can help me with this problem.

Apr 17 '06 #1
2 1823
I'm pretty new myself. But if you don't get anywhere using
mysql-python, I can recommend

mxODBC. I have connected to both MS Access DB and MySQL DB. You get it
from:

http://www.egenix.com/files/python/mxODBC.html

But read the instructions carefully as I think there are two things to
install.

If you search on python-msql and compare to mxODBC in this forum it
seems people have an easier time with mxODBC.

rpd

Apr 17 '06 #2
I tried mxODBC now, and it worked out of the box. Thanks for the tip!

Apr 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mikey | last post by:
Hi all, I'm having great problems trying to install the latest MySQl RPM package onto my Red Hat Linux OS. There is already MySQL v 3.0 pre-installed with the RH Linux distribution disk but I...
0
by: Yun Guan | last post by:
Hello mysql gurus, I am trying to run perl on mysql database on Red Hat box. I want to install DBI and DBD:mysql using CPAN: perl -MCPAN -e shell cpan>install DBI The above succeeded, but...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
2
by: Saqib Ali | last post by:
I installed mySQL and have it running.... but I think I made a mistake somewhere along the line...... I believe I did follow the instructions that were provided with the distribution at:...
1
by: Alex Hunsley | last post by:
I am trying to install the DBD::mysql perl module. However, it claims I need mysql.h: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /home/alex/.cpan/Metadata Database was...
0
by: ./Rob & | last post by:
Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
1
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: ...
3
by: menzies | last post by:
Hi, I"m new to this forum, but I have been trying all day to install DBD::mysql onto my Intel MacBook. I've read lots of forums pages and none have gotten me to a successful 'make test' or a...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.