0

I have installed pycrypto version 2.6 , and i am getting this error

from Crypto.Cipher import blockalgo
ImportError: cannot import name blockalgo

I have read many post but i am unable to solve this problem

Nishant Nawarkhede
  • 8,234
  • 12
  • 59
  • 81

1 Answers1

3

If you are not able to import anything from Crypto.Cipher at all, it might be due to folders, crypto and respective egg info, under site-packages are created with lower-case 'c'

/Library/Python/2.7/site-packages/crypto
/Library/Python/2.7/site-packages/crypto-1.0.0-py2.7.egg-info

Imports were successful when same case was used while importing

from crypto.Cipher import AES

or renaming the folders

/Library/Python/2.7/site-packages/Crypto-1.0.0-py2.7.egg-info
/Library/Python/2.7/site-packages/Crypto

I went with the later, to have consistency with others.

I use Eclipse and was able to overcome this problem using one of the above solutions. Sometimes we overlook these kind of details easily. Its a long shot, hope this helps!

srujan
  • 46
  • 2