Installing new versions of Python on Cygwin does not install Pip?

PythonCygwinPip

Python Problem Overview


While I am aware of the option of installing Pip from source, I'm trying to avoid going down that path so that updates to Pip will be managed by Cygwin's package management.

I've recently learned that the latest versions of Python include Pip. However, even though I have recently installed the latest versions of Python from the Cygwin repos, Bash doesn't recognize a valid Pip install on the system.

896/4086 MB RAM 0.00 0.00 0.00 1/12 Tue, Jun 16, 2015 ( 3:53:22am CDT) [0 jobs]
[ethan@firetail: +2] ~ $ python -V
Python 2.7.10
892/4086 MB RAM 0.00 0.00 0.00 1/12 Tue, Jun 16, 2015 ( 3:53:27am CDT) [0 jobs]
[ethan@firetail: +2] ~ $ python3 -V
Python 3.4.3
883/4086 MB RAM 0.00 0.00 0.00 1/12 Tue, Jun 16, 2015 ( 3:53:34am CDT) [0 jobs]
[ethan@firetail: +2] ~ $ pip
bash: pip: command not found
878/4086 MB RAM 0.00 0.00 0.00 1/12 Tue, Jun 16, 2015 ( 3:53:41am CDT) [0 jobs]
[ethan@firetail: +2] ~ $ pip2
bash: pip2: command not found
876/4086 MB RAM 0.00 0.00 0.00 1/12 Tue, Jun 16, 2015 ( 3:53:42am CDT) [0 jobs]
[ethan@firetail: +2] ~ $ pip3
bash: pip3: command not found

Note that the installed Python 2.7.10 and Python 3.4.3 are both recent enough that they should include Pip.

Is there something that I might have overlooked? Could there be a new install of Pip that isn't in the standard binary directories referenced in the $PATH? If the Cygwin packages of Python do in fact lack an inclusion of Pip, is that something that's notable enough to warrant a bug report to the Cygwin project?

Python Solutions


Solution 1 - Python

cel self-answered this question in a comment above. For posterity, let's convert this helpfully working solution into a genuine answer.

Unfortunately, Cygwin currently fails to:

  • Provide pip, pip2, or pip3 packages.
  • Install the pip and pip2 commands when the python package is installed.
  • Install the pip3 command when the python3 package is installed.

It's time to roll up our grubby command-line sleeves and get it done ourselves.

What's the Catch?

Since no pip packages are currently available, the answer to the specific question of "Is pip installable as a Cygwin package?" is technically "Sorry, son."

That said, pip is trivially installable via a one-liner. This requires manually re-running said one-liner to update pip but has the distinct advantage of actually working. (Which is more than we usually get in Cygwin Land.)

pip3 Installation, Please

To install pip3, the Python 3-specific version of pip, under Cygwin:

$ python3 -m ensurepip

This assumes the python3 Cygwin package to have been installed, of course.

pip2 Installation, Please

To install both pip and pip2, the Python 2-specific versions of pip, under Cygwin:

$ python -m ensurepip

This assumes the python Cygwin package to have been installed, of course.

Solution 2 - Python

  1. Download a helper package:
  1. Run the script:
  • For Python 2.7 run: easy_install-2.7 pip
  • For Python 3.4 run: easy_install-3.4 pip

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionredyoshi49qView Question on Stackoverflow
Solution 1 - PythonCecil CurryView Answer on Stackoverflow
Solution 2 - PythonmoovonView Answer on Stackoverflow