Python: 无法安装 googletrans

Python: Cannot install googletrans

我尝试安装 googletrans https://pypi.org/project/googletrans/

通过运行 这个命令作为建议:

$ pip install googletrans

但我总是在 python 3.5 和 python 2.7:

遇到同样的错误
Collecting googletrans
Using cached googletrans-3.0.0.tar.gz (17 kB)
ERROR: Could not find a version that satisfies the requirement httpx==0.13.3 (from googletrans) (from versions: none)
ERROR: No matching distribution found for httpx==0.13.3 (from googletrans)

我尝试了不同的命令,但我仍然无法弄清楚哪里出了问题。 安装 httpx 也失败:

pip install httpx
ERROR: Could not find a version that satisfies the requirement httpx (from versions: none)
ERROR: No matching distribution found for httpx

如有任何帮助,我们将不胜感激。谢谢

下次请阅读官方页面:https://github.com/encode/httpx

HTTPX requires Python 3.6+.

换句话说,为了安装 googletrans,它的依赖项 httpx 需要被安装,只有当你有 Python 3.6 或更高版本时才会发生。