本文介绍了ImportError:没有名为Crypto.Cipher的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行app.py(Python 3.3,PyCrypto 2.6)时,我的virtualenv不断返回上面列出的错误.我的导入语句只是from Crypto.Cipher import AES.我在寻找重复项,您可能会说有一些重复项,但是我尝试了解决方案(尽管大多数都不是解决方案),但没有任何效果.

When I try to run app.py (Python 3.3, PyCrypto 2.6) my virtualenv keeps returning the error listed above. My import statement is just from Crypto.Cipher import AES. I looked for duplicates and you might say that there are some, but I tried the solutions (although most are not even solutions) and nothing worked.

您可以在下面查看PyCrypto的文件格式:

You can see what the files are like for PyCrypto below:

推荐答案

我遇到了同样的问题(尽管在Linux上).解决方案非常简单-添加:

I had the same problem (though on Linux). The solution was quite simple - add:

libraries:
- name: pycrypto
  version: "2.6"

到我的app.yaml文件.由于过去该方法正常工作,因此我认为这是一个新要求.

to my app.yaml file. Since this worked correctly in the past, I assume this is a new requirement.

这篇关于ImportError:没有名为Crypto.Cipher的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 10:16