user1868607
user1868607

Reputation: 2600

No module named Crypto import error for sage

I'm running Sage's notebook on an Ubuntu machine and I'm using module crypto for using AES. My code is from Crypto.Cipher import AES. There are lots of posts with the error ImportError: No module named Crypto but none of them works for me apparently because I have a python anaconda installation and a python installation for Sage. How can I solve it?

Upvotes: 2

Views: 3769

Answers (1)

Samuel Lelièvre
Samuel Lelièvre

Reputation: 3453

Installing the pycrypto module with Sage's pip, by running the following in a terminal:

$ sage --pip install pycrypto

Then start Sage and use the Crypto module:

$ sage -q
sage: from Crypto.Cipher import AES
sage:

Upvotes: 4

Related Questions