zoukankan      html  css  js  c++  java
  • win7 + python3.6 +pycrypto 2.6.1 cp36 cp36m win_amd64.whl 安装

     win7(64位)+ python3.6 + pycrypto-2.6.1-cp36-cp36m-win_amd64.whl
    cp pycrypto-2.6.1-cp36-cp36m-win_amd64.whl C:Python36Scripts
    pip install pycrypto-2.6.1-cp36-cp36m-win_amd64.whl

    验证:
    >>> from Crypto.Cipher import AES
    >>> obj=AES.new('This is a key123',AES.MODE_CBC,'This is an IV456')
    >>> message="The answer is no"
    >>> ciphertext=obj.encrypt(message)
    >>> ciphertext
    b'xd6x83x8dd!VTx92xaa`Ax05xe0x9bx8bxf1'

    提取码: 3hcv
    https://pan.baidu.com/s/1Pn5qEhqAY7dyUXF9uZOnqw

    常见问题:

    >>> from Crypto.Random import random
    Traceback (most recent call last):
    File "<input>", line 1, in <module>
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    File "C:Python36libsite-packagesCryptoRandom\__init__.py", line 28, in <module>
    from Crypto.Random import OSRNG
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    File "C:Python36libsite-packagesCryptoRandomOSRNG\__init__.py", line 34, in <module>
    from Crypto.Random.OSRNG.nt import new
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    File "C:Python36libsite-packagesCryptoRandomOSRNG t.py", line 28, in <module>
    import winrandom
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    ModuleNotFoundError: No module named 'winrandom'
    >>> import Crypto.Random.random
    Traceback (most recent call last):
    File "<input>", line 1, in <module>
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    File "C:Python36libsite-packagesCryptoRandom\__init__.py", line 28, in <module>
    from Crypto.Random import OSRNG
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    File "C:Python36libsite-packagesCryptoRandomOSRNG\__init__.py", line 34, in <module>
    from Crypto.Random.OSRNG.nt import new
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    File "C:Python36libsite-packagesCryptoRandomOSRNG t.py", line 28, in <module>
    import winrandom
    File "D:Program Files (x86)JetBrainsPyCharm 2016.1.2helperspydev\_pydev_bundlepydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    ModuleNotFoundError: No module named 'winrandom'

    解决方案:

    修改 :C:Python36Libsite-packagesCryptoRandomOSRNG t.py

    #import winrandom
    from . import winrandom

  • 相关阅读:
    Android开发开源一款结合databinding写的用于RecyclerView的简单高效MultiTypeAdapter
    Android开发databinding和RecyclerView.ViewHolder的完美结合
    Android开发华为手机不弹出Toast,报HwRTBlurUtils: check blur style for HwToast-Toast...的原因
    android开发Toolbar标题居中显示的解决方法
    记录使用xshell通过ssh方式连接Linux机器的步骤
    同一局域网内手机访问电脑本地localhost网页的方法
    Gradle里面的依赖implementation和api的真正理解
    Android开发使用kotlin编写的泛型模式的MVP框架
    nyoj-3-多边形重心问题(求多边形面积和中心)
    nyoj-1132-promise me a medal(求线段交点)
  • 原文地址:https://www.cnblogs.com/jinpingzhao/p/12492878.html
Copyright © 2011-2022 走看看