pycrypto:没有名为 strxor 的模块

pycrypto : No module named strxor

我收到这个错误:

   Traceback (most recent call last):
     File "test.py", line 8, in <module>
       from Crypto.Cipher import PKCS1_OAEP
     File "C:\Users\Mokhles\Downloads\google-api-python-client-1.5.3\Crypto   \Cipher\PKCS1_OAEP.py", line 57, in <module>
       import Crypto.Signature.PKCS1_PSS
     File "C:\Users\Mokhles\Downloads\google-api-python-client-1.5.3\Crypto   \Signature\PKCS1_PSS.py", line 74, in <module>
       from Crypto.Util.strxor import strxor
   ImportError: No module named strxor

知道如何解决吗?

环境: -windows 10 -python 2.7

看起来您只是将 pyCrypto 复制到您的项目中。 PyCrypto 是依赖于某些原生 library/code(如 libtomcrypt)的库。您必须正确安装它。例如,您可以通过 pip 执行此操作:

pip2 install pycrypto

pip3 install pycrypto

取决于您要使其可用的 Python 版本。

尝试conda install pydotplus(可能需要先安装tqdm)