用Python的whois库之前,需要使用pip进行下载安装:pip install python-whois。不幸的是,我错误的输入了安装命令:pip install whois。这是一个旧的库,所以安装成功后找不到whois函数。经过搜索找到如下链接:https://stackoverflow.com/questions/41165091/attributeerror-module-object-has-no-attribute-whois,从中得到正确的答案:wrong
library, solution is to remove old one and install new - pip uninstall whois && pip install python-whois。
使用whois库寻找网站所有者
最新推荐文章于 2025-11-24 01:54:35 发布
本文介绍了一个关于Python whois库安装的常见错误及解决方法。作者误用了安装命令导致安装了旧版本的库而无法正常使用whois函数。通过正确的卸载旧库并安装新的python-whois库解决问题。
900

被折叠的 条评论
为什么被折叠?



