Title: no ensurepip in embedded Windows distribution
Type: behavior Stage: resolved
Components: Documentation, Installation, Windows Versions: Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: chriskrycho, docs@python, dstufft, ncoghlan, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2015-07-15 20:36 by chriskrycho, last changed 2015-08-11 18:14 by steve.dower. This issue is now closed.

Messages (4)
msg246775 - (view) Author: Chris Krycho (chriskrycho) Date: 2015-07-15 20:36
There is no `ensurepip` module bundled with the embedded distribution of Python 3.5 for Windows:

    Z:\python-3.5.0b3-embed> .\python -m ensurepip --upgrade
    Z:\python-3.5.0b3-embed\python.exe: No module named ensurepip

This may be the *intent*, but I haven't been able to find any documentation to that effect in the [docs]( It looks like it should either be included with the distribution or noted as excluded in the docs. (I can readily submit a patch to the latter if it needs doing.)

(Background: I'm looking at various ways to bundle up and ship a Python application, and as part of that am looking at just shipping the embedded Python distribution, which may end up being the most straightforward for us. One of the things I'm still sorting out is the best to get and bundle up dependencies if that's the approach we take.)
msg246777 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-07-15 21:55
It's a deliberate exclusion, I just haven't gotten to all the documentation yet (mostly because I still expect things to change).

My idea was that packages would be deployed statically alongside the embedded distribution rather than going into a site-packages directory (which should also be missing). Obviously this needs to be written up, but it may not be reasonable.

To automate packaging you probably want to use a separate pip to install into a temporary directory (--root option? I forget the option right now) and bundle that up. Does that sound feasible for you?
msg246778 - (view) Author: Chris Krycho (chriskrycho) Date: 2015-07-15 21:58
Using --root or --target (as appropriate to the specific package) does appear to be the preferred approach for that, and given the constraints of an embedded installation, I agree that that's the most reasonable solution. I spent a fair bit of time reading up on that and the other options, and can't see a better one. I've already verified that approach will work for us, so I imagine it should for others as well.
msg248419 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-08-11 18:14
Updated the documentation and it should be in 3.5.0rc1's docs on using with Windows.
Date User Action Args
2015-08-11 18:14:39steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg248419

stage: resolved
2015-07-15 21:58:47chriskrychosetmessages: + msg246778
2015-07-15 21:58:04vstinnersetassignee: docs@python

components: + Documentation
nosy: + docs@python
2015-07-15 21:55:55steve.dowersetmessages: + msg246777
2015-07-15 20:36:52vstinnersetnosy: + paul.moore, tim.golden, zach.ware
components: + Windows
2015-07-15 20:36:31chriskrychocreate