python - SystemExit: `requests` 您安装的库已被劫持

标签 python python-requests systemexit

我正在尝试导入我之前使用过的库来计算文本之间的指标,其中一个是评估包。当我导入包时,它说请求包已被劫持

我尝试卸载 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: 🔥

编辑:pip freeze 的屏幕截图 Screenshot of terminal pip freeze

最佳答案

您显然已经安装了python-requests 。卸载它。

关于python - SystemExit: `requests` 您安装的库已被劫持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76740574/

相关文章:

python - 逐字段比较两个 CSV 文件并列出所有不匹配项

python - 如何在 pytest 中断言 UserWarning 和 SystemExit

java - 在 java 中调用 System.exit() 的确切目的是什么

android - 关闭应用程序并从最近的应用程序中删除/

Python 脚本不起作用,但也不给出错误

python - 定义一个包含不等式的函数

python - 如何在显示来自 cam 的视频时制作屏幕截图?

python - 通过命令行管理 CQ5,不使用 cURL 或 wget

python - 来自 Aminer API 的请求

python - 向 Imgur 发送文件时遇到问题