Cannot open include file: 'ctype.h': No such file or directory

Repair / Reinstall visual studio. Make sure that the Windows SDK option (Probably 8.1 in your case) is ticked, As you can see in this picture: enter image description here

To add the missing component, go to Control Panel -> Uninstall a Program, and select to Change the installation of Visual Studio. Then, here is the option you need to check: enter image description here Then press "Modify".

Also don't forget to update the project's Properties to be using Windows SDK version 10.0.17134.0. enter image description here

Here is mine VS 2017 build tools configuration to make Python 3.7 and up to compile on my local machine and fix. Please notice that MS changed VS Studio Build Tools interface

VS Build Tool 2017 configuration for pyodbc compilation

In order to make code to compile you also MUST to install ODBC driver

You can download VS 2017 Build tools from:

VS Build Tool 2017 download