1

After finding so many solutions simply by browsing SO, it's time to ask my first question.

For convenience, I need to provide my team with executables (on Windows) of my Python (3.7) scripts, so after a little research I opted for PyInstaller. However, I keep running into connection timeout during pip installation, more specifically when dependencies are being built, even more specifically when collecting setuptools. I'm aware of this and I read through a great deal of more or less related issues, therefore I'm using pip 18.1. Since I'm in corporate environment, I also need to use --proxy and --trusted-host options, and I'm installing in venv. (The errors are different when using pip >19.0 and 18.1, thus I know it's not the problem covered in the link above)

Interestingly, I can install basically any other packages with the same proxy and trusted host settings and even PyInstaller itself is downloaded from PyPi.org, it's collecting setuptools particularly that runs into error. Funnily, setuptools is already available in the very same venv. Worth mentioning that I get the exact same error as if I ran pip install without proxy/trusted host, which leaves me suspecting that it indeed times out for some reasons.

What am I missing? Is it possible that proxy/trusted host parameters are not passed further down the line when the install process is trying to build dependencies? (I also tried to ignore dependencies and take care of them manually, however pip 18.1 doesn't seem to have that option according to pip -h)

I'll be able to provide exact error log / screenshot later from work.

Thanks in advance

gylsmrk
  • 21
  • 3

1 Answers1

1

alright, it turns out setting proxies as environment variables instead of passing them to pip as parameters solves the problem. I had to run the following once to set env vars:

set http_proxy=http://mycompanys.proxy.com:XXXX
set https_proxy=https://mycompanys.proxy.com:XXXX

...before running

pip install PyInstaller --trusted-host https://pypi.org --trusted-host https://files.pythonhosted.org

Hope it helps someone in the future.

gylsmrk
  • 21
  • 3