TypeError: '> =' is not supported between instances of 'NoneType' and 'str'

I managed to install pycrypto as follows following the answer given.

enter image description here

But when I debug the project, I get the following problem, which seems to be related to Crypto .

ModuleNotFoundError: no module named 'winrandom'

enter image description here

aut\token.py line 3 -

 from jose.jwt import get_unverified_claims 

UPDATE: 1

Then I ran pip install winrandom and got the following error.

TypeError: '> =' is not supported between instances of 'NoneType' and 'str'

enter image description here

UPDATE: 2

When I run the proposed pip install --proxy http://XXXX:80 git+https://github.com/dlitz/pycrypto.git with a proxy (required) in the production environment, I get a connection failure error message as follows .

enter image description here

+5
source share
2 answers

This seems to be a common problem with pycrypto. This is a mistake, but the project does not seem to be updated in the last couple of years.

Digging up the problem, ( https://github.com/andrewcooke/simple-crypt/issues/17 ) It seems that poblem is solved by editing the import statement in crypto\Random\OSRNG\nt.py :

 import winrandom to from . import winrandom 
+2
source

As Winnie mentioned, this problem is known and resolved in Pycrypto, but PyPi still delivers the old version of Pycrytpto. Instead, you can install the latest version directly from the GitHub repository using:

 pip install git+https://github.com/dlitz/pycrypto.git 
+1
source

Source: https://habr.com/ru/post/1270511/


All Articles