我已經在我的Ubuntu 10 安裝的MySQL5我已經安裝了python2.7這些命令:的Python 2.7和MySQL的Ubuntu安裝 - ZipImportError
$ tar xfz Python-2.7.1.tgz
$ cd Python-2.7.1
$ ./configure && make && sudo make install
$ sudo rm /usr/bin/python
$ sudo ln -s /usr/local/python2.7 /usr/bin/python
我讀,我需要MySQLdb的也。於是,我就安裝mysql-python的:
$ tar xfz MySQL-python-1.2.1.tar.gz
$ cd MySQL-python-1.2.1
$ python setup.py build
$ sudo python setup.py install
,並得到:
Traceback (most recent call last):
File "setup.py", line 17, in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools
試圖安裝setuptools的:
$ sh setuptools-0.6c11-py2.7.egg
,並得到:
Traceback (most recent call last):
File "<string>", line 1, in <module>
zipimport.ZipImportError: can't decompress data; zlib not available
」不是個t zlib應該與默認的pytho捆綁在一起n安裝?
BTW。你爲什麼不使用apt-get來安裝打包的軟件? – vartec 2011-05-02 13:24:16
我想我應該從一開始就這樣做,但我只是遵循Django&Python的指令安裝。另外我在想,也許所有的軟件包在Ubuntu中都沒有系統地提供。隨意用apt-get更正我的答案。 – 2011-05-02 13:43:01