Quantcast
Channel: MySQL Forums - Connector/Python
Viewing all articles
Browse latest Browse all 384

Problem installing MySQLdb on Linux (no replies)

$
0
0
I downloaded MySQL-python-1.2.3.tar.gz and when I do 'python setup.py build' I get the following traceback:

'import site' failed; use -v for traceback
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from setuptools import setup, Extension
File "build/bdist.linux-i686/egg/setuptools/__init__.py", line 2, in <module>

File "build/bdist.linux-i686/egg/setuptools/extension.py", line 2, in <module>
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 5, in <module>
File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 2, in <module>
File "/usr/lib/python2.6/distutils/command/install.py", line 21, in <module>
from site import USER_BASE
File "build/bdist.linux-i686/egg/site.py", line 73, in <module>
__boot()
File "build/bdist.linux-i686/egg/site.py", line 33, in __boot
imp.load_module('site',stream,path,descr)
File "/usr/lib/python2.6/site-packages/site.py", line 73, in <module>
__boot()
File "/usr/lib/python2.6/site-packages/site.py", line 33, in __boot
imp.load_module('site',stream,path,descr)
File "/usr/lib/python2.6/site.py", line 513, in <module>
main()
File "/usr/lib/python2.6/site.py", line 496, in main
known_paths = addsitepackages(known_paths)
File "/usr/lib/python2.6/site.py", line 288, in addsitepackages
addsitedir(sitedir, known_paths)
File "/usr/lib/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python2.6/site.py", line 155, in addpackage
exec line
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'setdefaultencoding'


I'm using python 2.6.4 and MySQL 5.1.47. Django is also installed.

I see similar tracebacks when searching the web, but haven't found a solution yet.

Any suggestions would gratefully received.

jb

Viewing all articles
Browse latest Browse all 384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>