I have downloaded the pycrypto module for python 3, so I Can use AES in my python code. (EG if I have a code called encodeUsingAES.py)
However, this wouldn't work if I just copied encodeUsingAES.py to a different computer and ran it right? Because it doesn't have the pycrypto module installed so it will pop up heaps of errors.
I tried just copying the Crypto folders inside pycrypto into the same directory as my .py file but it didn't work.
Is there anyway for my to have all the files I need in the same directory so when I compress and send the folder the recipient can just run the .py file without having to install extra modules?
Thanks!
from Crypto import Random
from Crypto.Cipher import AES
EDIT: Tried this didn't work
import sys
sys.path.append("/pycrypto")
from Crypto import Random
from Crypto.Cipher import AES
$ python3 testCrypto.py
Traceback (most recent call last):
File "testCrypto.py", line 5, in <module>
from Crypto import Random
ImportError: No module named 'Crypto'
or
import sys
sys.path.append("pycrypto/lib")
from Crypto import Random
from Crypto.Cipher import AES
$ python3 testCrypto.py
Traceback (most recent call last):
File "testCrypto.py", line 5, in <module>
from Crypto import Random
File "pycrypto/lib/Crypto/Random/__init__.py", line 28, in <module>
from Crypto.Random import OSRNG
File "pycrypto/lib/Crypto/Random/OSRNG/__init__.py", line 32, in <module>
from Crypto.Random.OSRNG.posix import new
File "pycrypto/lib/Crypto/Random/OSRNG/posix.py", line 66
except IOError, e: