[DB-SIG] Installing MySQL-python on python 2.2

Andy Todd andy47@halfcooked.com
Mon, 03 Jun 2002 11:56:08 +1000


Clement wrote:
> Hi Andy,
> 
> Thank you very much for your quick response.  I am sorry that I did not
> supply the full details.
> 
> I am running RH7.2 (will upgrade to 7.3 soon) on P-III CPU.  I got the
> binary RPM from Sourceforge web site exactly as you have suggested.
> However, that binary rpm, MySQL-python-0.9.1.tar.gz, installs in
> /usr/lib/python2.1 instead of /usr/lib/python2.2.  I cannot use it from
> Python 2.2.1.
> 
> What would you suggest?
> 
> Regards,
> 
> Clement
> ANS Communications P/L
> ===============================================
> Post Addr:  P O Box 6626 Blacktown BC, NSW 2148
> Tel: 1300 300 266             Fax: 1300 300 331
> 
> 
>>-----Original Message-----
>>From: db-sig-admin@python.org [mailto:db-sig-admin@python.org]On Behalf
>>Of Andy Todd
>>Sent: Monday, June 03, 2002 11:19 AM
>>To: Clement
>>Cc: db-sig@python.org
>>Subject: Re: [DB-SIG] Installing MySQL-python on python 2.2
>>
>>
>>Clement wrote:
>>
>>>Do you know where can I download a copy of MySQL-python module
>>
>>that works
>>
>>>with Python 2.2.1?  The copy that is available at Sourceforge
>>
>>will install
>>
>>>in /usr/lib/python2.1 only.
>>>
>>>Thank you very much for your help.
>>>
>>>Regards,
>>>
>>>Clement
>>>
>>>
>>>
>>>
>>>_______________________________________________
>>>DB-SIG maillist  -  DB-SIG@python.org
>>>http://mail.python.org/mailman/listinfo/db-sig
>>>
>>
>>http://sourceforge.net/project/showfiles.php?group_id=22307&releas
>>e_id=51760
>>
>>Scroll down to the highlighted section (should be 0.91). If you are on
>>Windows select the file with the name
>>MySQL-python-0.9.1.win32-py2.2.exe. I can confirm that this works with
>>Python 2.2.1.
>>
>>If you are not running Windows then get the source distribution and
>>compile it yourself. If you get compilation errors when you have
>>expanded the archive and then done 'python setup.py install' then post
>>them here and we will try and help you out.
>>
>>If you are running Red Hat and have donwloaded the rpms then someone
>>else will have to help you out.
>>
>>Regardless, its generally a good idea to let us know which operating
>>system, distribution (and version) of Python, and which version of MySQL
>>you are running.
>>
>>Regards,
>>Andy
>>--
>>----------------------------------------------------------------------
>> From the desk of Andrew J Todd esq - http://www.halfcooked.com
>>
>>
>>

OK. The problem is probably with your installation rather than MySQL-python.

Bearing in mind that I'm not a Red Hat user and I've never installed an 
RPM module. That aside, I'm not going to stop my crashing ignorance stop 
me from telling you what to do.

I would suspect that python 2.1 is in your path ahead of python 2.2. 
Which version starts when you type 'python' at the command line? What do 
you see when you type 'which python'. If you have both versions 
installed and available to run in your environment, primarily by having 
the different executables in directories on your PATH, then you can get 
version conflicts.

In the past I've seen similar problems when I'm running more than one 
version of Python and the order of the PATH entries is usually the key. 
If the installer finds the 2.1 lib directory first then that may be the 
reason it is used as the installation target. However, if you are 
running 2.2 by default the package *should* install into the 2.2 
site-packages - I think.

If for some reason you can't get that to work with the RPM then I would 
suggest you switch to the source distribution as that will play ball 
(I've installed it on Debian so I'm not completely ignorant on that 
point ;-)

Regards,
Andy
-- 
----------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com