Offline Installation of python & pip

后端 未结 1 396
梦如初夏
梦如初夏 2021-01-02 23:45

I need to install python on a sever to run scripts but the server has no access to the internet.

The server has access to a local network that has access to the inte

1条回答
  •  执笔经年
    2021-01-03 00:46

    The official Python installer for Windows has no other dependencies. It runs completely offline.

    For other packages that may have dependencies (that are difficult to install on Windows); Christopher Gholke maintains a list of Windows installers for common Python packages. These are msi installers (or whl files) that are self-contained.

    They are designed to work with the official Python installer for Windows - as they use its registry entries to identify the install location.

    You can download these and move them to your Windows machine.

    Beyond those two - if you have further requirements you can use tools like basket to download packages and then provide the location as a source for offline pip installs; or create your own pip repository.

    If you do decide to create a local pip repository, it is better to create a pip proxy (see pypicache for example) this way you are only requesting those packages that are required, rather than trying to mirror the entire cheeseshop.

    0 讨论(0)
提交回复
热议问题