Botched Python install on Ubuntu 12.04 LTS (can't import MySQL) -


i beginner programmer trying learn python. made smart move ubuntu, being unfamiliar os environment believe botched install of python.

i have installed vim , mysql. both installed correctly. vim works correctly python, mysql not.

when try import mysql python get:

>>> import mysqldb traceback (most recent call last):   file "<stdin>", line 1, in <module> importerror: no module named mysqldb 

i believe path setup wrong python. have tried uninstall , reinstall. said might have python 2.7.5 installed when need 2.7.3 on ubuntu 12.04.

here sys.path

>>> import sys >>> print sys.path ['', '/home/allen/lib/python', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages' 

i wish fix on own, have been searching online no success. in advance help. it's appreciated.

you need install mysql-python need python bindings import.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -