Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crypto module is not visible to Python after installation on Windows XP

I'm trying to use the Crypto module in Python. I downloaded the Windows installer that was referenced here on StackOverflow (an msi) and the installation went fine. However, when the interpreter hits the 'from Crypto.Cipher import AES' line in my code, it fails saying there is no such module.

I've also done a help('modules') and it doesn't seem to be listed here either. Can anyone tell me what I might have done wrong or how I might get this actually working. All I'm trying to to is encrypt a file!

like image 490
CajunTechie Avatar asked Oct 10 '22 22:10

CajunTechie


1 Answers

Works for me:

Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from Crypto.Cipher import AES
>>>

Some steps to try:

  • Download from this link: http://www.voidspace.org.uk/python/modules.shtml#pycrypto
  • Make sure to get the installer specific to your python version. I chose 2.6 at the link above.
  • Make sure you install to the copy of python you intend to use if there is more than one installed.
like image 180
Gringo Suave Avatar answered Oct 14 '22 03:10

Gringo Suave