Menu

linux redhat 7 installation problem

Help
dovka
2004-07-31
2012-09-19
  • dovka

    dovka - 2004-07-31

    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?

     
    • dovka

      dovka - 2004-08-06

      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.

       
      • Andy Dustman

        Andy Dustman - 2004-09-07

        This is fixed in 1.0.1b1.

         
      • Anonymous

        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.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.