title: pip install error for mysqlclient command -u -c "import setuptools, tokenize failed with error code 1
body: <p>I am trying to install <code>mysqlclient</code> for a Django app but I am getting the following error when running <code>sudo pip install mysqlclient</code></p>
  
  <pre><code>Command "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-6mmeJ5/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-wmyB7z/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/include/site/python2.7/mysqlclient" failed with error code 1 in /private/tmp/pip-install-6mmeJ5/mysqlclient/
  </code></pre>
  
  <p>Full terminal output:</p>
  
  <pre><code>Collecting mysqlclient
    Downloading https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz (85kB)
      100% |████████████████████████████████| 92kB 987kB/s 
  Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
      Complete output from command /Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-6mmeJ5/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-wmyB7z/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/include/site/python2.7/mysqlclient:
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14-intel-2.7
      creating build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/__init__.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/_exceptions.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/compat.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/connections.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/converters.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/cursors.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/release.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      copying MySQLdb/times.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb
      creating build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      copying MySQLdb/constants/__init__.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      copying MySQLdb/constants/CLIENT.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      copying MySQLdb/constants/CR.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      copying MySQLdb/constants/ER.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      copying MySQLdb/constants/FIELD_TYPE.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      copying MySQLdb/constants/FLAG.py -&gt; build/lib.macosx-10.14-intel-2.7/MySQLdb/constants
      running build_ext
      building 'MySQLdb._mysql' extension
      creating build/temp.macosx-10.14-intel-2.7
      creating build/temp.macosx-10.14-intel-2.7/MySQLdb
      cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql-connector-c/6.1.11/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c MySQLdb/_mysql.c -o build/temp.macosx-10.14-intel-2.7/MySQLdb/_mysql.o
      MySQLdb/_mysql.c:1126:33: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
              return PyInt_FromString(rowitem, NULL, 10);
                                      ^~~~~~~
      /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/intobject.h:34:46: note: passing argument to parameter here
      PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int);
                                                   ^
      1 warning generated.
      MySQLdb/_mysql.c:304:23: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
                  int j, n2=PySequence_Size(fun);
                         ~~ ^~~~~~~~~~~~~~~~~~~~
      MySQLdb/_mysql.c:892:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
              len = mysql_real_escape_string_quote(&amp;(self-&gt;connection), out, in, size, '\'');
                  ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      MySQLdb/_mysql.c:897:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
              len = mysql_escape_string(out, in, size);
                  ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      MySQLdb/_mysql.c:1126:33: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
              return PyInt_FromString(rowitem, NULL, 10);
                                      ^~~~~~~
      /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/intobject.h:34:46: note: passing argument to parameter here
      PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int);
                                                   ^
      MySQLdb/_mysql.c:1215:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                  len = strlen(buf);
                      ~ ^~~~~~~~~~~
      MySQLdb/_mysql.c:1217:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                  len = strlen(buf);
                      ~ ^~~~~~~~~~~
      MySQLdb/_mysql.c:1253:23: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                      len = strlen(buf);
                          ~ ^~~~~~~~~~~
      MySQLdb/_mysql.c:1255:23: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                      len = strlen(buf);
                          ~ ^~~~~~~~~~~
      8 warnings generated.
      cc -bundle -undefined dynamic_lookup -Wl,-F. build/temp.macosx-10.14-intel-2.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.14-intel-2.7/MySQLdb/_mysql.so
      ld: library not found for -lssl
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command 'cc' failed with exit status 1
  
      ----------------------------------------
  Command "/Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-6mmeJ5/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-wmyB7z/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jimmymona/Development/onBeat/TFS/USDSA/udsa_content_repository/venv/include/site/python2.7/mysqlclient" failed with error code 1 in /private/tmp/pip-install-6mmeJ5/mysqlclient/
  </code></pre>
  
  <p>I also tried using <code>MySQL-python</code> but that gave the same error.</p>
  
  <p>Anyone know what the issue could be?</p>