0

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

sonic
  • 13
  • 2

2 Answers2

0

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.

Jürgen Gmach
  • 5,366
  • 3
  • 20
  • 37
  • Thanks for your support! I can install the library using pip with proxy but cannot with tox – sonic Mar 01 '21 at 08:22
0

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

Yeti
  • 841
  • 5
  • 26
  • PS D:\projects\napalm-aos> pip install future Requirement already satisfied: future in c:\users\vmtri2\appdata\local\programs\python\python39\lib\site-packages\future-0.18.2-py3.9.egg (0.18.2) so sorry I don't know how to add the capture in comment. I can use pip to install library. my company is using the proxy has address 10.10.10.10:8080 currently. i am using tox 3.22.0 – sonic Mar 02 '21 at 02:05
  • pip install --proxy http://10.10.10.10:8080 future Requirement already satisfied: future in c:\users\vmtri2\appdata\local\programs\python\python39\lib\site-packages\future-0.18.2-py3.9.egg (0.18.2). – sonic Mar 02 '21 at 02:11
  • yeah, I got it. It needs to set proxy into the setenv in tox.ini file. Thank you so much – sonic Mar 02 '21 at 07:40
  • you only need to set that if your host shell does not have the proxy set (assuming you're using 3.14 and later) – Yeti Mar 03 '21 at 08:32