[Cryptography-dev] ModuleNotFoundError: No module named 'cryptography'
Shai Anany
shaikoni at gmail.com
Sat Nov 21 05:55:31 EST 2020
Hi there
I have already successfully installed cryptography on my computer but when
trying to run the code:
from cryptography.fernet import Fernet
import base64
key = Fernet.generate_key()
cipher = Fernet(key)
message = "Message to be encrypted".encode('utf-8')
token = cipher.encrypt(message)
cipher = Fernet(key)
decoded = cipher.decrypt(token)
print(decoded)
Traceback (most recent call last):
File ".../Crypto.py", line 1, in <module>
from cryptography.fernet import Fernet
ModuleNotFoundError: No module named 'cryptography'
Process finished with exit code 1
When checking crypto installation I can see that it's installed on:
...\\PycharmProjects\\pythonProject\\venv\\lib\\site-packages
...\\PycharmProjects\\pythonProject\\venv
...\\AppData\\Local\\Programs\\Python\\Python38-32
...\\AppData\\Local\\Programs\\Python\\Python38-32
...\\AppData\\Local\\Programs\\Python\\Python38-32\\DLLs
...\\AppData\\Local\\Programs\\Python\\Python38-32\\python38.zip
...\\PycharmProjects\\pythonProject
...\\Desktop
I'm saving my code on the Desktop. I'm using Python 3.8.6.
What else can be the issue here?
BR
Shai
[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
11/21/20,
12:54:10 PM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/cryptography-dev/attachments/20201121/30b44145/attachment.html>
More information about the Cryptography-dev
mailing list