Install MySQL + Python + Win2K

Gerhard Häring gerhard.nospam at bigfoot.de
Fri Apr 6 20:21:40 EDT 2001


You got the MySQLdb distribution from my homepage? I have wasted too much of my
time yesterday with MySQLdb and ActiveState's Python build. Get the standard
Python build from www.python.org. If you need COM support for Windows or want
the PythonWin IDE, get and install the win32all package from ActiveState. With
the standard Python/Windows distribution, my MySQLdb build will work.

It works for Python 1.5.2, 2.0 and 2.1beta2 from www.python.org. It doesn't for
the ActiveState builds. My guess is that the ActiveState people have broken
something in distutils, but I have no time or energy to debug this now.

Gerhard

On Fri, 06 Apr 2001 22:42:40 GMT, zc <zenchm at usa.net> wrote:
>Hi,
>I am just starting to Learn Python.
>Can you help mwith my MySQL setup problem?
>This is what I get when: pythin setup.py install
>
>I've modified the setup.py to point to c:\sys\mysql:
>elif sys.platform == "win32":
>    include_dirs = [r'c:\opt\mysql\include']
>    library_dirs = [r'c:\sys\mysql\lib\opt']
>    libraries = [mysqlclient, 'zlib', 'msvcrt', 'libcmt','wsock32',
>'advapi32']
>    runtime_library_dirs = []
>    extra_objects = [r'c:\sys\mysql\lib\opt\mysqlclient.lib']
>
>I have no idea where to go from here.
>Thanks for any tips you may choose to provide.
>Zenon
>
>
>C:\sys\python\mysql>python setup.py install
><snip>
>not copying build\lib.win32-2.0\_mysql_const\CLIENT.py (output up-to-date)
>not copying build\lib.win32-2.0\_mysql.pyd (output up-to-date)
>byte-compiling C:\sys\python\MySQLdb.py to MySQLdb.pyc
>Traceback (most recent call last):
>  File "setup.py", line 101, in ?
>    extra_objects=extra_objects,
>  File "c:\sys\python\lib\distutils\core.py", line 138, in setup
>    dist.run_commands()
>  File "c:\sys\python\lib\distutils\dist.py", line 829, in run_commands
>    self.run_command(cmd)
>  File "c:\sys\python\lib\distutils\dist.py", line 849, in run_command
>    cmd_obj.run()
>  File "c:\sys\python\lib\distutils\command\install.py", line 483, in run
>    self.run_command(cmd_name)
>  File "c:\sys\python\lib\distutils\cmd.py", line 328, in run_command
>    self.distribution.run_command(command)
>  File "c:\sys\python\lib\distutils\dist.py", line 849, in run_command
>    cmd_obj.run()
>  File "c:\sys\python\lib\distutils\command\install_lib.py", line 93, in run
>    self.byte_compile(outfiles)
>  File "c:\sys\python\lib\distutils\command\install_lib.py", line 130, in
>byte_compile
>    verbose=self.verbose, dry_run=self.dry_run)
>  File "c:\sys\python\lib\distutils\util.py", line 423, in byte_compile
>    compile(file, cfile, dfile)
>  File "c:\sys\python\lib\py_compile.py", line 60, in compile
>    codeobject = __builtin__.compile(codestring, dfile or file, 'exec')
>TypeError: compile, argument 1: expected string without null bytes, string
>found
>
>C:\sys\python\mysql>
-- 
mail:   gerhard <at> bigfoot <dot> de
web:    http://highqualdev.com



More information about the Python-list mailing list