MySQLdb on a VPS...

Gerhard Häring gerhard.nospam at bigfoot.de
Sat Feb 3 01:36:43 EST 2001


"trace s. ruggles" wrote:
> 
> I'm at a total loss here and desperately need help!!! I'm trying to install
> the MySQLdb module but this is what I get... (running FreeBSD4.2 on a VPS,
> note my "/usr/home/axiomfir/" prefix to all folder listings)
> 
> ..
> 
> axiomfire% ./python Lib/site-packages/MySQLdb/setup.py build
> running build
> running build_py
> warning: build_py: file MySQLdb.py (for module MySQLdb) not found
> warning: build_py: file CompatMysqldb.py (for module CompatMysqldb) not
> found
> warning: build_py: file MySQLdb.py (for module MySQLdb) not found
> warning: build_py: file CompatMysqldb.py (for module CompatMysqldb) not
> found
> running build_ext
> Traceback (most recent call last):
>   File "Lib/site-packages/MySQLdb/setup.py", line 90, in ?
>     extra_objects=extra_objects,
>   File "/usr/home/axiomfir/usr/local/python2/Lib/distutils/core.py", line
> 138, in setup
>   File "/usr/home/axiomfir/usr/local/python2/Lib/distutils/dist.py", line
> 829, in run_commands
>   File "/usr/home/axiomfir/usr/local/python2/Lib/distutils/dist.py", line
> 849, in run_command
>   File
> "/usr/home/axiomfir/usr/local/python2.0/Lib/distutils/command/build.py",
> line 106, in run
>   File "/usr/home/axiomfir/usr/local/lib/python2.0/Lib/cmd.py", line 328, in
> run_command
>     print "\n"
>   File "/usr/home/axiomfir/usr/local/python2/Lib/distutils/dist.py", line
> 849, in run_command
>   File
> "/usr/home/axiomfir/usr/local/python2.0/Lib/distutils/command/build_ext.py",
> line 200, in run
>   File "/usr/home/axiomfir/usr/local/python2.0/Lib/distutils/sysconfig.py",
> line 107, in customize_compiler
>   File "/usr/home/axiomfir/usr/local/python2.0/Lib/distutils/sysconfig.py",
> line 369, in get_config_vars
>   File "/usr/home/axiomfir/usr/local/python2.0/Lib/distutils/sysconfig.py",
> line 281, in _init_posix
> distutils.errors.DistutilsPlatformError: invalid Python installation: unable
> to open /usr/home/axiomfir/usr/local/lib/python2.0/config/Makefile (No such
> file or directory)

This sounds as if your Python installation were screwed up in the first
place. Does basic Python work? You should check first if simple things
work, like importing modules and such:

import socket, sys, os
print socket.gethostname(), 'running', sys.platform
print os.system('uname -a')

If Python is ok, the MySQLdb module is usually built by just untarring
it somewhere (*not* in the lib/site-packages of your Python
installation). Somewhere like /tmp. Then check if the paths to MySQL are
ok in the setup.py file. Then issuing python setup.py build. Then python
setup.py install.

Gerhard

PS: Why is the path like this:
/usr/home/axiomfir/usr/local/python2.0/Lib/...

Why is the Lib with an uppercase L? This is very strange.
-- 
Sorry for the fake email, please use the real one below to reply.
contact: g e r h a r d @ b i g f o o t . d e
web:     http://highqualdev.com



More information about the Python-list mailing list