pip install python-jose fails on Windows 10
pip install python-jose
...
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
----------------------------------------
Failed building wheel for pycrypto
...
Command "c:\python_virtual_envs\jwt\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ME\\appdata\\local\\temp\\pip-build-6sf2d9\\pycrypto\\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\ME\appdata\local\temp\pip-ouryei-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\python_virtual_envs\jwt\include\site\python2.7\pycrypto" failed with error code 1 in c:\users\ME\appdata\local\temp\pip-build-6sf2d9\pycrypto\
I have the same issue
The ideal solution would be to replace the dependency to pycrypto (outdated, no longer supported) with pycryptodome which is a drop-in replacement for pycrypto that has wheels on pypi.
Currently, if you install the Win C++ tools the compile of pycrypto fails. You can make some minor tweaks to header files and get the install to complete.
My point in commenting is that, even if the user takes the extra step to install Visual C++, pycrypto still blocks a clean install.
I would very-much like if python-jose used pycryptodome. Even better would be if I could find time to make a PR. ;)
... It took me looking at source code to notice this: python-jose-cryptodome.
I suggest you make that your dependency and close this issue.
Were you able to install it on windows? It also fails for win7, can't get it to install
Slightly related and for your information: There was an issue with regards to building and installing pycryptodome on Windows (using mingw). This is now resolved. If you install https://github.com/Legrandin/pycryptodome first, then the rest should work (as well). See https://github.com/Legrandin/pycryptodome/commit/a84d382b5733b1a20a7ec49abed53b0c5519f590 for more information.
Hope this helps,
Peter