Error importing _counter form pycrypto library

半世苍凉 提交于 2019-12-24 03:50:13

问题


This line in Crypto/Util/Counter.py from the pycrypto lib:

from Crypto.Util import _counter

Causes this error:

ImportError: cannot import name _counter

But I have the file _counter.so under Crypto/Util in the pycrypto library of Python's site-packages. I am using Python 2.7.5, 32-bit for Windows.


回答1:


File _counter.so belongs to Linux/MacOS package, Windows should have _counter.pyd instead. Prebuilt Windows PyCrypto packages can be downloaded from here: http://www.voidspace.org.uk/python/modules.shtml#pycrypto



来源:https://stackoverflow.com/questions/21450147/error-importing-counter-form-pycrypto-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!