There is a problem in the distutils documentation that says it supports an older version of python that it actually does. You can just install the latest version of python, or you can follow this guide (I think i did this under python 2.1 or such):
This is what you must do:
First edit setup.py:
Change all instances of 'os.getenv' to 'os.environ.get';
then in _mysql.c file:
change all instances of 'PySequence_Size' to 'PySequence_Length'
then it should work,
hope this helps someone else.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-09-17
I ran into both problems (os.getenv and PySequence_Size) while installing MySQL-python-1.0.0) on RedHat Linux 7.2 Thanks for the tips, both worked like a charm!
I gotta say this is my first experience installing Python packages. I am a big Perl can and the whole CPAN thing makes things quite a bit easier. Maybe it's just version compatibility issues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i installed distutils fine, however i'm getting an error upon trying to install this:
[admin@srv0 MySQL-python-1.0.0]$ python setup.py build
Traceback (innermost last):
File "setup.py", line 13, in ?
mysqlclient = os.getenv('mysqlclient', 'mysqlclient')
AttributeError: getenv
[admin@srv0 MySQL-python-1.0.0]$
any ideas?
i fixed this myself.
There is a problem in the distutils documentation that says it supports an older version of python that it actually does. You can just install the latest version of python, or you can follow this guide (I think i did this under python 2.1 or such):
This is what you must do:
First edit setup.py:
Change all instances of 'os.getenv' to 'os.environ.get';
then in _mysql.c file:
change all instances of 'PySequence_Size' to 'PySequence_Length'
then it should work,
hope this helps someone else.
This is fixed in 1.0.1b1.
I ran into both problems (os.getenv and PySequence_Size) while installing MySQL-python-1.0.0) on RedHat Linux 7.2 Thanks for the tips, both worked like a charm!
I gotta say this is my first experience installing Python packages. I am a big Perl can and the whole CPAN thing makes things quite a bit easier. Maybe it's just version compatibility issues.