MySQLdb1
MySQLdb1 copied to clipboard
python2.7 install this module error
hello, when I use pip install this module, the terminal show this error message, my system is mac and the version of python is 2.7. what can i do to resolve it? thanks for your answer. the error message at bottom.
` Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/bf/rf_c_9f57b30tn47dv70hxlm0000gn/T/pip-install-dv3Rky/MySQL-python/`
Uninstall MySQL, download and install the package through https://dev.mysql.com/downloads/mysql/, fool installation; Then download MySQL-python-1.2.5.zip, unzip it and open the setup_posix.py file, find mysql_config.path = "/usr/mysql_config", and change to the mysql_config path in your system; Finally, the python setup.py install is installed by source code, and the pro test is successful. Good luck!
MySQL-python-1.2.5 jlb$ python setup.py install running install running bdist_egg running egg_info writing MySQL_python.egg-info/PKG-INFO writing top-level names to MySQL_python.egg-info/top_level.txt writing dependency_links to MySQL_python.egg-info/dependency_links.txt reading manifest file 'MySQL_python.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'MySQL_python.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.13-intel/egg running install_lib running build_py ... Copying MySQL_python-1.2.5-py2.7-macosx-10.13-intel.egg to /Users/jlb/Desktop/my_venvs/wx_venv/lib/python2.7/site-packages
if only debug python code on remote , why need install mysql on local??
Observed similar errors with pip installation on my OSX environment. Source installation was easier. Steps for source installation -
- Edit mysql_config path mentioned in MySQL-python-1.2.5/site.cfg with correct path on your local environment. For example, mysql_config = /usr/local/mysql/bin/mysql_config
- Run below commands inside directory
MySQL-python-1.2.5$ python setup.py build $ sudo python setup.py install