views:

39

answers:

1

I need to install MySQLdb.

I write:

$ tar xfz MySQL-python-1.2.1.tar.gz
$ cd MySQL-python-1.2.1    
$ python setup.py build    #it is ok
$ su root setup.py install    #return list of errors

error list:

  • setup.py: line 3: import: command not found

  • setup.py: line 4: import: command not found-

  • setup.py: line 5: from: command not found-

  • setup.py: line 7: syntax error nearunexpected token '('-

  • setup.py: line 7: 'if not hasattr(sys, "hexversion") or sys.hexversion < 0x02030000:'

What's wrong?

+1  A: 

You forgot an important word in your example: "python"

$ su root python setup.py install
msw