问题
The install instructions are:
$ python setup.py build
$ sudo python setup.py install # or su first
This gives me an .egg file. How do I tell the install to dump the files as a normal, uncompressed library?
Thanks!
回答1:
OK, I hate to answer my own question, but:
find your python site-packages (mine is /usr/local/lib/python2.5/site-packages )
then:
$ unzip MySQL_python-1.2.2-py2.5-linux-i686.egg
This worked fine for me
回答2:
I'm a little late to this party, but here's a way to do it that seems to work great:
sudo python setup.py install --single-version-externally-managed --root=/
And then you don't use a .python-egg, any *.pth files etc.
回答3:
From the EasyInstall doc, command line options:
--always-unzip, -Z
Don't install any packages as zip files, even if the packages are marked as safe for running as a zipfile.
Can you use easyinstall instead of calling setup.py ?
calling easy_install -Z mysql_python
from the command prompt, finds the egg on the net and installs it.
回答4:
This will tell setuptools to not zip it up:
sudo python setup.py install --single-version-externally-managed
来源:https://stackoverflow.com/questions/268025/install-mysqldb-for-python-as-non-compressed-egg