当我尝试使用 requirements.txt 文件 #Django 安装库时出现此错误

I got this error when i'm tring to install libraries using requirements.txt file #Django

无法安装google-api-core

virtualenv 虚拟环境 来源 venv/bin/activate pip install -r requirements.txt

错误:google-api-core 1.10.0 要求请求<3.0.0dev,>=2.18.0,但您将有不兼容的请求 2.11.1。

Screenshot

您已在 requirements.txt 文件中指定 requests==2.11.1,并且如错误所述,google-api-core 需要 2.18.0 或更高版本。

我建议您升级您的项目正在使用的请求版本,并在尝试添加 google-api-core 之前先对其进行测试。

或者更改 requirements.txt 以便它指定 requests>=2.11.1 或者可能使用 ~= "compatible" 运算符。