2

我尝试安装 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

任何帮助将不胜感激。谢谢

4

1 回答 1

1

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

HTTPX 需要 Python 3.6+。

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

于 2020-11-09T19:53:41.497 回答