title: IMDBPy installing mysqlclient fails - Python 2.7 Windows
body: <p>I'm a former developer, but haven't done much with Python to date. I'm trying to get the full IMDB database into a MySQL server before the text files go poof.</p>
  
  <p>I now know IMDBPy requires Python 2.7 (thanks David!) so I am on a clean machine with Py 2.7 installed. My understanding is that I need several packages installed before I can run the imdbpy2sql script successfully.</p>
  
  <p>These are:</p>
  
  <ul>
  <li>Python 2.7</li>
  <li>MySQL (using the latest version of community server 5.7.2)</li>
  <li>SQL Object</li>
  <li>mysqlclient  (requires VC++ compliler for Python
  2.7)</li>
  </ul>
  
  <p>I have everything installed up to the mysqlclient. When I attempt to install it, it fails with a message that seems to indicate it cannot find the \include folder for MySQL.</p>
  
  <pre><code>C:\Windows\system32&gt;pip install -U SQLObject
  Collecting SQLObject
    Downloading SQLObject-3.4.0-py2.py3-none-any.whl (1.7MB)
      100% |################################| 1.8MB 652kB/s
  Collecting PyDispatcher&gt;=2.0.4 (from SQLObject)
    Downloading PyDispatcher-2.0.5.tar.gz
  Collecting FormEncode!=1.3.0,&gt;=1.1.1 (from SQLObject)
    Downloading FormEncode-1.3.1.tar.gz (197kB)
      100% |################################| 204kB 3.3MB/s
  Installing collected packages: PyDispatcher, FormEncode, SQLObject
    Running setup.py install for PyDispatcher ... done
    Running setup.py install for FormEncode ... done
  Successfully installed FormEncode-1.3.1 PyDispatcher-2.0.5 SQLObject-3.4.0
  
  C:\Windows\system32&gt;pip install mysqlclient
  Collecting mysqlclient
    Downloading mysqlclient-1.3.12.tar.gz (89kB)
      100% |################################| 92kB 837kB/s
  Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
      Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\michael\\appdata\\local\\temp\\pip-build-jgsnac\\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 c:\users\michael\appdata\local\temp\pip-uwgilx-record\install-record.txt --single-version-externally-managed --compile:
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-2.7
      copying _mysql_exceptions.py -&gt; build\lib.win-amd64-2.7
      creating build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\__init__.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\compat.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\connections.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\converters.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\cursors.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\release.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      copying MySQLdb\times.py -&gt; build\lib.win-amd64-2.7\MySQLdb
      creating build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\__init__.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\CLIENT.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\CR.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\ER.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\FIELD_TYPE.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\FLAG.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      copying MySQLdb\constants\REFRESH.py -&gt; build\lib.win-amd64-2.7\MySQLdb\constants
      running build_ext
      building '_mysql' extension
      creating build\temp.win-amd64-2.7
      creating build\temp.win-amd64-2.7\Release
      C:\Users\Michael\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -Ic:\python27\include -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.win-amd64-2.7\Release\_mysql.obj /Zl
      _mysql.c
      _mysql.c(29) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
      error: command 'C:\\Users\\Michael\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
  
      ----------------------------------------
  Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\michael\\appdata\\local\\temp\\pip-build-jgsnac\\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 c:\users\michael\appdata\local\temp\pip-uwgilx-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\michael\appdata\local\temp\pip-build-jgsnac\mysqlclient\
  </code></pre>
  
  <p>I have confirmed the include folder is there as well as the mysql.h file it is looking for (the default installation location was "c:\Program Files\MySQL\MySQL Server 5.7\include"). I didn't have a problem installing mysqlclient when I was using a newer version of Python (3). So I'm assuming there's some disconnect between the 2.7 version and newer versions of MySQL. Maybe a config file that needs to be updated? Any help would be appreciated.</p>