1

Attempting to pip install MySQL-python in a virtual environment, also getting an error trying to pip install it outside of a virtual environment.

I've read similar questions and tried all the proposed solutions, but 1) none worked and 2) I don't really understand the cause of this still. Could someone help me out?

Apologies in advance for the noobish question, I'm pretty new to this.

Here's the error:

(env)ryans-air:outreach ryanfarley$ pip install MySQL-python Collecting MySQL-python /Users/ryanfarley/Desktop/outreach/env/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: mysql_config: command not found Traceback (most recent call last): File "", line 20, in File "/private/var/folders/fb/5pp5q35x541493ccjj7g0w580000gn/T/pip-build-BIQjaP/MySQL-python/setup.py", line 17, in metadata, options = get_config() File "setup_posix.py", line 43, in get_config libs = mysql_config("libs_r") File "setup_posix.py", line 25, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) EnvironmentError: mysql_config not found

---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in

/private/var/folders/fb/5pp5q35x541493ccjj7g0w580000gn/T/pip-build-BIQjaP/MySQL-python

user3236406
  • 579
  • 1
  • 4
  • 10
  • See http://stackoverflow.com/questions/29134512/insecureplatformwarning-a-true-sslcontext-object-is-not-available-this-prevent – dan-klasson Oct 25 '15 at 04:34
  • @dan-klasson unfortunately that did not work :( – user3236406 Oct 25 '15 at 14:06
  • See if the answer here does the trick for you: [https://stackoverflow.com/a/52548990/7305166](https://stackoverflow.com/a/52548990/7305166) – bb8 Dec 23 '18 at 05:16

1 Answers1

0

The MySQL libraries have not been installed or cannot be found by pip when installing the package. The MySQL-python package will rely on MySQL libraries and executables (in the case of mysql_config) on your system.

See pip install mysql-python fails with EnvironmentError: mysql_config not found.

Brian Lee
  • 518
  • 5
  • 9