可以使用以下命令来指定超时时间:

pip install --timeout <seconds> <package_name>

其中 <seconds> 是超时时间,单位为秒。例如,如果要将超时时间设置为 30 秒:

pip install --timeout 30 requests

这将在 30 秒内尝试安装名为 requests 的包,如果超时则会中断安装并显示错误信息。

pip install 指定超时

原文地址: https://www.cveoy.top/t/topic/un3 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录