我尝试安装googletranshttps://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或更高版本时,才能安装。
对于那些拥有python 3.6+但仍然无法安装库的人,请继续pypi网站
然后手动下载文件,提取并将其放入安装了python或anaconda的库文件中。然后再次尝试安装pip。
它对我有效,我希望它对你也有效。