python - Python:无法安装 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 需要 Python 3.6+。
换句话说,为了安装googletrans
,它的依赖httpx
需要被安装,而且只有当你有 Python 3.6 或更高版本时才会发生这种情况。
推荐阅读
- html - 从 GitHub Pages 上的 URL 中删除 .html 扩展名
- html - CSS 变量不更新
- python - 如何在 pyOpenSSL 中为证书签名请求设置多个组织单位 (OU) 值
- javascript - 如何访问响应和获取的结果?
- c# - 扩展 C# Worker 服务以处理多个配置
- python - 带有 Tensorflow Hub 的 Keras 模型在保存/恢复时不会给出相同的结果
- distributed-system - 和弦指表是如何初始化的?
- html - 定位绝对元素不可见
- javascript - 如何使用 Javascript 将菜单连接到显示器?
- ocaml - 如何在 Ocaml 中将列表的元素组合成一个元素?