0

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?

SilentGhost
322k67 gold badges312 silver badges294 bronze badges
asked Jun 24, 2010 at 8:17
3
  • I am not sure root is needed there, just try su python setup.py install Commented Jun 24, 2010 at 8:35
  • @S.Mark, on su python setup.py install - returned error su: user python does not exist. Commented Jun 24, 2010 at 9:04
  • ah, sorry, I was confused with sudo Commented Jun 24, 2010 at 9:16

1 Answer 1

1

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

$ su root python setup.py install
answered Jun 24, 2010 at 8:22
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.