我正在尝试导入我之前使用过的库来计算文本之间的指标,其中一个是评估包。当我导入包时,它说请求包已被劫持
我尝试卸载 python-requests、evaluate 和 requests 并重新安装 requests 和 evaluate,但没有任何变化。还尝试安装 python-dotenv。
我有
python==3.9.13
请求==2.31.0
这是输出
from evaluate import load
bertscore = load("bertscore")
predictions = ["hello there", "general kenobi"]
references = ["hello there", "general kenobi"]
results = bertscore.compute(predictions=predictions, references=references, lang="en")
Well 💩. The `requests` library you installed has been been hijacked 😱
An exception has occurred, use %tb to see the full traceback.
SystemExit: 🔥
最佳答案
您显然已经安装了python-requests 。卸载它。
关于python - SystemExit: `requests` 您安装的库已被劫持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76740574/