If MySQLdb's now distributed in a way that requires setuptools
, your choices are either to download the latter (e.g. from here) or refactor MySQLdb's setup.py to bypass setuptools
(maybe just importing setup
and Extension
from plain distutils
instead might work, but you may also need to edit some of the setup_*.py
files in the same directory).
Depending on how your site's Python installation is configured, installing extensions for your own individual use without requiring sysadm rights may be hard, but it's never truly impossible if you have shell access. You'll need to tweak your Python's sys.path to start with a directory of your own that's your personal equivalent of the system-wide site pacages directory, e.g. by setting PYTHONPATH
persistently in your own environment, and then manually place in said personal directory what normal installs would normally place in site-packages (and/or subdirectories thereof).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…