python-jose icon indicating copy to clipboard operation
python-jose copied to clipboard

pip install python-jose fails on Windows 10

Open Tset-Noitamotua opened this issue 8 years ago • 6 comments

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\

Tset-Noitamotua avatar Oct 03 '17 20:10 Tset-Noitamotua

I have the same issue

simonjk avatar Oct 31 '17 05:10 simonjk

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.

jdelic avatar Nov 08 '17 10:11 jdelic

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. ;)

basking2 avatar Nov 13 '17 18:11 basking2

... It took me looking at source code to notice this: python-jose-cryptodome.

I suggest you make that your dependency and close this issue.

basking2 avatar Nov 13 '17 18:11 basking2

Were you able to install it on windows? It also fails for win7, can't get it to install

jcmartinezdev avatar Jan 12 '18 16:01 jcmartinezdev

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

PeterMosmans avatar Mar 22 '18 04:03 PeterMosmans