在 tox.ini 中为 tox 设置代理

问题描述

我是 tox 库的新手。我没能运行 tox

enter image description here

这是我的 tox.ini

enter image description here

代理配置似乎失败了。

enter image description here

请帮帮我。提前致谢

解决方法

我从来不需要为 tox / pip 使用代理,但在阅读 https://leifengblog.net/blog/how-to-use-pip-behind-a-proxy/ 后,我建议尝试两件事......

a) 将环境变量小写为 https_proxy

b) 将代理命令传递给 pip 类似于 sudo pip install --proxy=https://[username:password@]proxyserver:port somepackage

我会采用第二种方法,因为上述博文中的一位评论者提到 environment variable approach 在 Linux 上对他不起作用。

另请参阅此处的 official pip documentation

,

我是 tox 的作者/维护者。如果您使用的是 tox 3.14.4 或更高版本,则无需指定环境变量 - 请参阅 https://github.com/tox-dev/tox/commit/33fd18be87ba9eed85f7767e20abce0c90fffe4e

您不需要使用最新版本的 pip/tox 进行任何更改。我每天都在代理背后使用 tox。

我可以使用带代理的 pip 安装库,但不能使用 tox

你能详细说明这两点吗?你是怎么做到的?

附注。如果您想要一个更具互动性的帮助频道https://discord.gg/tox

,我们有一个不和谐的聊天