Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
crypto import issue
#1
from Crypto.PublicKey import RSA
  File "C:\Program Files\Python36\lib\site-packages\crypto\PublicKey\__init__.py", line 21, in <module>
    from Crypto.Util.asn1 import (DerSequence, DerInteger, DerBitString,
ModuleNotFoundError: No module named 'Crypto'
i am getting this import error.
i have a crypto lib in sitepackages,but still getting this error in Python 3.6.5 version
Reply
#2
(Dec-19-2018, 09:23 AM)saisankalpj Wrote:
Error:
File "C:\Program Files\Python36\lib\site-packages\crypto\PublicKey\__init__.py", line 21, in <module>

In most programming languages, capitalization matters. https://github.com/dlitz/pycrypto/issues/156
If you previously installed a different crypto package, the folder would already exist as a lowercase, so pip wouldn't re-create it capitalized. So you might need to just manually rename the folder in site-package to Crypto.
Reply
#3
(Dec-19-2018, 09:03 PM)nilamo Wrote:
(Dec-19-2018, 09:23 AM)saisankalpj Wrote:
Error:
File "C:\Program Files\Python36\lib\site-packages\crypto\PublicKey\__init__.py", line 21, in <module>

In most programming languages, capitalization matters. https://github.com/dlitz/pycrypto/issues/156
If you previously installed a different crypto package, the folder would already exist as a lowercase, so pip wouldn't re-create it capitalized. So you might need to just manually rename the folder in site-package to Crypto.

Yes renaming crypto to Crypto works.But this cant be a permanent solution.Any permanent solution for this??
Another thing which i tried is deleting crypto folder and again doing pip install pycryptodome.This automatically creates Crypto folder
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Puzzling import issue that I have no idea how to solvr starseeker 3 432 Feb-21-2024, 05:07 PM
Last Post: deanhystad
  Creating a TG crypto Bot_ problem when trying to with bot.polling p1ner0 1 1,384 Apr-27-2022, 03:43 AM
Last Post: p1ner0
  how to manage crypto trading flooding data from exchange servers Mikeardy 0 1,210 Dec-26-2021, 08:31 PM
Last Post: Mikeardy
  Problem with using Crypto library reks2004 2 2,376 Mar-27-2020, 05:38 AM
Last Post: buran
  Python crypto byte plaintext to hexint Mangaz90 2 2,807 Feb-21-2020, 07:42 PM
Last Post: Mangaz90
  Create file archive that contains crypto hash ED209 1 2,006 May-29-2019, 03:05 AM
Last Post: heiner55
  import psycopg2 issue bhuvneshdogra 1 2,957 Dec-27-2018, 04:03 PM
Last Post: Larz60+
  AES encryption - does not match between arduino and python 3 crypto guillaume55 0 3,992 Sep-23-2018, 11:14 AM
Last Post: guillaume55
  Win10 Import math issue Oldsquid 2 3,045 May-12-2018, 11:08 AM
Last Post: Oldsquid

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020