今天在微信小程序服务端集成了微信的登录解密模块 WXBizDataCrypt,集成后运行程序时出现了下面的错误

(.venv) [1lin24@1lin24]# python manager_dev.py runserver
Traceback (most recent call last):
  File "manager_dev.py", line 5, in <module>
    app = create_app('dev')
  File "/prj/dev/flask_template/app/__init__.py", line 24, in create_app
    from .api.v1 import api_bp as api_v1_bp
  File "/prj/dev/flask_template/app/api/v1/__init__.py", line 15, in <module>
    from .user import UserRes
  File "/prj/dev/flask_template/app/api/v1/user.py", line 7, in <module>
    from ...utils.WXBizDataCrypt import WXBizDataCrypt
  File "/prj/dev/flask_template/app/utils/WXBizDataCrypt.py", line 3, in <module>
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'

我直接运行了 pip install crypto
但安装过后,仍然出现同样的错误,在网上翻了一下

解决办法如下:

pip install pycrypto

ReadMore

python3.6 错误: ModuleNotFoundError:No module named "Crypto"

01-12 13:59