问题
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