【发布时间】:2022-01-09 10:47:01
【问题描述】:
我正在尝试启动我编写的脚本,该脚本应该从 firebase db 读取数据,但它会引发以下错误:
Traceback (most recent call last):
File "myScript.py", line 8, in <module>
from firebase import Firebase
File "/Users/georgeoprea/Library/Python/3.8/lib/python/site-packages/firebase/__init__.py", line 20, in <module>
from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'
我尝试通过以下方式安装 Crypto:
pip3 install Crypto
pip3 install pycryptodome
当我运行pip3 show Crypto 时,我得到以下输出:
Name: crypto
Version: 1.4.1
Summary: Simple symmetric GPG file encryption and decryption
Home-page: https://github.com/chrissimpkins/crypto
Author: Christopher Simpkins
Author-email: git.simpkins@gmail.com
License: MIT license
Location: /Users/georgeoprea/Library/Python/3.8/lib/python/site-packages
Requires: Naked, shellescape
Required-by:
这是我在myScript.py 中的导入列表:
from bs4 import BeautifulSoup
import time
import smtplib
from datetime import datetime
import json
import random
from email.message import EmailMessage
from firebase import Firebase
操作系统信息:macOS 12.1 在 M1 Pro 上运行。
如何让我的脚本识别Crypto 模块?
【问题讨论】: