Python Forum
crypto import issue - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: crypto import issue (/thread-14825.html)



crypto import issue - saisankalpj - Dec-19-2018

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


RE: crypto import issue - nilamo - Dec-19-2018

(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.


RE: crypto import issue - saisankalpj - Dec-20-2018

(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