[Cryptography-dev] ModuleNotFoundError: No module named 'cryptography'

Shai Anany shaikoni at gmail.com
Sat Nov 21 09:20:03 EST 2020


I installed it incide pycharm and it fixed it.

BR

בתאריך שבת, 21 בנוב׳ 2020, 12:55, מאת Shai Anany ‏<shaikoni at gmail.com>:

> 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/91edfbe8/attachment-0001.html>


More information about the Cryptography-dev mailing list