Skip to content

pymanager - proxy support for offline installs #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jose-albino opened this issue Jun 6, 2025 · 4 comments · Fixed by #129
Closed

pymanager - proxy support for offline installs #128

Jose-albino opened this issue Jun 6, 2025 · 4 comments · Fixed by #129
Assignees
Labels
bug Something isn't working

Comments

@Jose-albino
Copy link

Background

I have downloaded the latest pymanager and i wanted to perform a offline installation

my windows server can only go to internet via proxy. and even tough we configured "netsh winhttp set proxy :" .

I see it stills tries to get it directly.

Details

logs attached.

python_install_20250606161106_8452.log

@Jose-albino Jose-albino added the question Further information is requested label Jun 6, 2025
@zooba
Copy link
Member

zooba commented Jun 6, 2025

It's supposed to be using the proxy automatically, we pass the WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY option, but maybe there are cases where that doesn't work. I'll have to dig in a bit further into that API.

As for the offline install, it looks like you've installed the MSI, which doesn't include an offline package by default. You need the MSIX (or the Store install) for that, or you need to do a py install --download ... on another machine and transfer the packages yourself (as described in the docs).

@zooba
Copy link
Member

zooba commented Jun 6, 2025

It's supposed to be using the proxy automatically, we pass the WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY option, but maybe there are cases where that doesn't work.

Okay, I very quickly found a reference (not public, I'm afraid) saying that the flag doesn't do what it says, and we still need to specifically look up the proxy for the URL. I'll add it for the next update, looks pretty straightforward.

@zooba zooba self-assigned this Jun 6, 2025
@zooba zooba added bug Something isn't working and removed question Further information is requested labels Jun 6, 2025
@Jose-albino
Copy link
Author

Jose-albino commented Jun 6, 2025 via email

@zooba
Copy link
Member

zooba commented Jun 9, 2025

I prefer to use the msi as that is installed as a system application. And that was a requirement for me. With the msix seems to use only the user folders

The MSIX is installed once for all users, and any user can do the installation. There are ways to deploy to all users automatically (discussed briefly in the documentation, but it's not a scenario we care to support upstream). The MSI will involve you doing a bit more work, but that's why we put it there.

I was able to hack a “bundled” folder that is placed in the “C:\Program Files\Pymanager\” and use the fallback-index.json file placed there with relative files path to download and install the required zip packages.

This is intentionally supported, so if it works for you, go ahead. You can also specify some global settings in the HKLM registry if you want to put the fallback files elsewhere - read the docs for this info. These will work even if someone installs the MSIX themselves.

Also I would propose actually to bundle within the distribution the python files in the bundled folder also for the msi and include more than the last beta.

Afraid this isn't going to happen, if only because of the file size. The Python Install Manager is about 10MB, but each Python runtime is about 40MB. Even including the current stable1 is unreasonably misbalanced, but we really want our main installer (the MSIX) to be copyable to an offline machine, installed, and have Python be available.

However, you're welcome to create your own MSI from the files that bundles whatever you like. Especially for managing across your own machines. You just don't get it "for free" from our volunteers.

Footnotes

  1. It's the latest 3.14 beta/RC only during beta/RC, since we expect people who get the newest installer want the newest runtime. Once both are stable, it'll still keep including 3.14 while 3.15 beta is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants