Setup proxy for tox in tox.ini

1k Views Asked by At

I'm a newbie in the tox library. I failed to run tox enter image description here

and this is my tox.ini enter image description here

It seems the proxy configuration is failed. enter image description here

Please help me. Thanks in advance

2

There are 2 best solutions below

1
On

I never had to use a proxy for tox / pip, but after reading https://leifengblog.net/blog/how-to-use-pip-behind-a-proxy/ I would suggest to try two things...

a) lower case the environment variable to https_proxy

b) pass in the proxy command to pip similar like sudo pip install --proxy=https://[username:password@]proxyserver:port somepackage

I'd go with the second approach, as one commenter in above blog post mentioned the environment variable approach did not work for him on Linux.

Also see here the official pip documentation.

4
On

I am the author/maintainer of the tox. If you're using tox 3.14.4 or later you don't need to specify the environment variables - see https://github.com/tox-dev/tox/commit/33fd18be87ba9eed85f7767e20abce0c90fffe4e

You should not need to change anything with a recent version of pip/tox. I'm using tox from behind a proxy on a daily basis.

I can install the library using pip with proxy but cannot with tox

Can you detail both of these? How you do it?

PS. We have a discord chat if you'd like a more interactive help channel https://discord.gg/tox