After a lot of troubleshooting, I've finally resolved this issue. I believe that many Windows users will encounter the same problem, so here's how to get pybitshares working on a Windows PC:
(Some of these steps are probably unnecessary... but I can't be sure which ones are the most important)
First, install Visual Studio Community 2017 (
https://www.visualstudio.com/downloads/)
Even if you've already installed this previously, there are updates that may be required, as new components have been added recently. To do this, search the start menu for "Apps & Features", find Visual Studio Community 2017, and click "update". When that's done, click "modify".
Make sure that you select the "Individual Components" tab, then scroll down to "Components, build tools and runtimes".
These are the components that I have selected (you definitely don't need all of these - but this combination works for me):
C# and Visual Basic Roslyn compilers
C++/CLI support
MSBuild
Python 2 32-bit (2.7.14)
Python 2 64-bit (2.7.14)
Python 3 32-bit (3.6.3)
Python 3 64-bit (3.6.3)
VC++ 2015.3 v140 toolset for desktop (x86,x64)
VC++ 2017 v141 toolset (x86,x64)
Visual C++ compilers and libraries for ARM
Visual C++ runtime for UWP
Visual C++ tools for CMake
Windows Universal CRT SDK
Once all those are selected, click "Modify".
Then, from the start menu, search for "x64 Native Tools Command Prompt for VS 2017". Right click it, and "Run as administrator" (IMPORTANT!). Then run the following commands:
pip uninstall bitshares
pip uninstall pycryptodome
pip uninstall cryptography
pip install cryptography
pip install pycryptodome
pip install bitshares
You're done! pybitshares should now work correctly!
Why does this work?
I believe that the pycryptodome and/or cryptography installs can be broken if you don't have the correct Visual Studio Compiler Tools installed and added to the PATH environment variable. Any attempt to update these tools later will appear successful, but the initial install remains broken. The type of error messages you will see when you first try to install pybitshares will be similar to:
"cl.exe failed with exit status 2"
"error: command 'cl.exe' failed: No such file or directory"
"Cannot open include file: 'openssl/aes.h': No such file or directory"
...and other openssl related errors.
Oddly, with a broken install, all the pybitshares commands will still work - but any command that sends information to the blockchain will take 10 - 20 minutes instead of 1 - 2 seconds.
I hope this helps somebody!