0

I'm trying to install pip on a windows machine using python 2.6. I usually use python 2.7, but my companies production servers are running python26 so I need to make sure my code runs on 2.6 before handing it off to them. I'm using pip to install the following modules that my code leverages:

dateutil.parser
bs4
pandas
datetime
urllib2
random
os
time
os

I tried using the link below to install pip, but it directs me to a very long page of text and no doanload prompt. https://pip.pypa.io/en/stable/installing/

All of the links I've found on the topic have pointed me to the same link that doesn't seem to be functioning properly. How to install pip for python 2.6?

Is there a way to install directly on the command line? Or an alternate link I could use to install the pip module?

Thanks! Ben

Community
  • 1
  • 1
ben890
  • 1,097
  • 5
  • 25
  • 56

1 Answers1

1

Download the .whl file from this link.

Open command prompt as admin and go to the location of the file.

type the following command:

python.exe pip-8.0.3-py2.py3-none-any.whl/pip install pip-8.0.3-py2.py3-none-any.whl.

Now latest version of pip should be installed.

To use pip go to your python26 folder the scripts. usually C:\Python26\Scripts

[EDIT]

OK this works for sure:

  1. Download get-pip.py
  2. Now just double click to open the file (or python get-pip.py at its location).
  3. It must automatically download and install.

Make sure you have C:\Python26 is added to your path and it did not work previously for you as you might have used sudo and python2.6 instead of just python

Ganesh Kathiresan
  • 2,068
  • 2
  • 22
  • 33
  • I got a TypeError: NoneType object is unsubscriptable – ben890 Apr 12 '16 at 14:34
  • 1
    Can you elaborate on your problem and at which stage do you get that message? – Ganesh Kathiresan Apr 13 '16 at 13:11
  • I opened the command prompt as an admin and navigated to the location of the pip file (which I placed in the same filepath as where python26 is located). I then ran the command you mentioned above and I got the error I mentioned. – ben890 Apr 13 '16 at 13:39
  • I am not exactly sure why this error has occurred.But can you place it else where and navigate accordingly, as the same python26 folder might have led to some clashes – Ganesh Kathiresan Apr 13 '16 at 14:46
  • It seems to have installed, but now when I import pip it says theres "No module named pip". Any ideas? – ben890 Apr 13 '16 at 15:23
  • So python.exe is located in C/Python26, while my scripts folder is located at C\Python26\Tools\Scripts. SHould I move the scripts folder to be in the same directory as python.exe? – ben890 Apr 13 '16 at 15:24
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/109068/discussion-between-ganesh-k-and-ben). – Ganesh Kathiresan Apr 13 '16 at 15:56