Using MySQLdb Newbie

Jordan Elver jord at theinternetone.co.uk
Wed Sep 19 14:43:09 EDT 2001


Hi again. Thanks for your help so far.
I now have Python 2.1 ;-)
But, I tried the MySQLdb install again and it gave me this:

running build_ext
Traceback (most recent call last):
  File "setup.py", line 117, in ?
    extra_objects=extra_objects,
  File "/usr/lib/python2.1/distutils/core.py", line 138, in setup
    dist.run_commands()
  File "/usr/lib/python2.1/distutils/dist.py", line 899, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.1/distutils/dist.py", line 919, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.1/distutils/command/build.py", line 106, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.1/distutils/cmd.py", line 328, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.1/distutils/dist.py", line 919, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.1/distutils/command/build_ext.py", line 231, in run
    customize_compiler(self.compiler)
  File "/usr/lib/python2.1/distutils/sysconfig.py", line 121, in 
customize_compiler
    (cc, opt, ccshared, ldshared, so_ext) = \
  File "/usr/lib/python2.1/distutils/sysconfig.py", line 370, in 
get_config_vars
    func()
  File "/usr/lib/python2.1/distutils/sysconfig.py", line 302, in _init_posix
    raise DistutilsPlatformError, my_msg
distutils.errors.DistutilsPlatformError: invalid Python installation: unable 
to open /usr/lib/python2.1/config/Makefile (No such file or directory)

Whats going on now?

I also tried the rpm whcih installs, but then when I do this:

# import the MySQL db library
import MySQLdb

It can't find it?!

Any ideas?

Cheers,
Jord

On Wednesday 19 September 2001 08:58, you wrote:
> On Wed, 19 Sep 2001, Jordan Elver wrote:
> > On Wednesday 19 September 2001 08:10, you wrote:
> > > On Wed, 19 Sep 2001, Jordan Elver wrote:
> > > > Sorry. More details coming.
> > > > I'm using Linux Mandrake 8.0 with Python version 2.0.
> > > > I downloaded the tarball uncompressed it and read the README. It says
> > > > to run python setup.py build then python setup.py install. But, when
> > > > i try either of these they both give the same error?
> > >
> > > Install newer Distutils.
> >
> > Where do i get Distutils?
>
> As usual:
>
> http://www.google.com/search?q=Distutils
>
> > Or should I upgrade to Python 2.1? I tried but got errors saying it
> > requires libcrypto and libssl?
>
> For socket module, yes. That is about all it requires + expat. Mandrake
> has python-2.1.1-3mdk.src.rpm for it.
>
> Sincerely yours, Roman A.Suzi

-- 
Jordan Elver
Web Developer
The InternetOne UK Ltd




More information about the Python-list mailing list