Compiling packages is not easy. Some packages are straightforward to compile. Most require modifications and lots of trial and error.
First, you’ll need to get a copy of Microsoft Visual Studio 2015. Without it you can’t compile. I use a pro license at work, there might be a free/affordable “home” edition you can get.
Second, you’ll need to get a distribution of Python 2.7 built with Visual Studio 2015 (to match Maya 2018). You can use mayapy.exe, but some packages require specific headers and libraries you won’t have without the full Python dist. Luckily for you somebody did the hard work for you here.. You can download his version of Python built for VS2015… or you can try to get by with mayapy.exe. If you stick with mayapy and the package you’re trying to compile complains about missing Python headers and libraries, using his version will fix that.
Whether you use mayapy.exe or a custom build of python, make sure the interpreter’s location (mayapy.exe/python.exe) is in your system path.
Third, all packages that need to be compiled require you to set your environment variables so that distutils knows where to find your compiler’s libraries. To do that you need to run one or more .bat scripts buried in your VS2015 install folder. With some Googling you’ll find which you need, as I can’t remember off the top of my head.
If you want to save yourself a lot of problems, go grab a copy of Intel® Parallel Studio XE. You don’t need to buy it, just register and download the 30 day trail. This will give you a nice 64bit environment shell you can use to compile and save you a lot of pain.
At this point you have all the basics covered to start compiling. Once you have the source code to a package you want to compile, look for a readme file that will give you some info about dependencies and how to build. Sometimes you can get lucky, navigate to the source code, run “python.exe setup.py build” and it’ll work. But most times this won’t be the case. That is when you need to use some Google-fu.
pywin32 is one of those packages that will not be easy to compile.
Fortunately there are kind souls out there have shared their knowledge and experience with the internets for free! Even if their goals don’t match yours (this last link is for VS2012), there is still something in there you can learn from. With a little luck doing a few tweaks (like just changing the path to the compiler) might get it to work for you.
Sometimes you get even luckier and find a gift from the heavens in the form of a fork off the source code that claims has been modified to work with the compiler you need.
So that’s all I got for you at this point. When I get in the office on Monday I can take a swing at compiling it for you, and if you have a list of packages you need, I might be able to help further.
But just on a final note: there’s a reason why there’s no central depot of every python package compiled to work with Maya 20xx, it’s because it’s not easy