Setting up pip on cygwin

From PeformIQ Upgrade
Jump to navigation Jump to search

Here's How

Install python-setuptools when you install cygwin as this will install easy_install.

To install pip run the easy_install command as follows:

 $ easy_install-V.n pip

where V.n is the python version, 2.7 or 3.4 as appropriate for your installation:

So:

$ easy_install-2.7 pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 8.1.2
Downloading https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz#md5=87083c0b9867963b29f7aba3613e8f4a
Processing pip-8.1.2.tar.gz
Writing /tmp/easy_install-8HEs_M/pip-8.1.2/setup.cfg
Running pip-8.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8HEs_M/pip-8.1.2/egg-dist-tmp-UO8VS6
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.landscape.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching '.github'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
creating /usr/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg
Extracting pip-8.1.2-py2.7.egg to /usr/lib/python2.7/site-packages
Adding pip 8.1.2 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin

Installed /usr/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

Once done pip away to your hearts content:

$ pip install pymysql
Collecting pymysql
  Downloading PyMySQL-0.7.6.tar.gz (69kB)
    100% |████████████████████████████████| 71kB 139kB/s
Installing collected packages: pymysql
  Running setup.py install for pymysql ... done
Successfully installed pymysql-0.7.6

$ pip install pydbf
Collecting pydbf
  Downloading pyDBF-0.1.zip
Installing collected packages: pydbf
  Running setup.py install for pydbf ... done
Successfully installed pydbf-0.1

$ pip install pymssql
Collecting pymssql
  Downloading pymssql-2.1.3.tar.gz (897kB)
    100% |████████████████████████████████| 901kB 1.1MB/s
Installing collected packages: pymssql
  Running setup.py install for pymssql ... done
Successfully installed pymssql-2.1.3

Alternately

Go to - https://pip.pypa.io/en/latest/installing/

Get the script get-pip.py and run it.

Upgrading

$ pip install pip --upgrade

Mostly does the trick. Sometimes I get file access issues on Windows when upgrading.