Chelonian
Chelonian

Reputation: 569

pip using Python 2.5 and need to use Python 2.7

I'm trying to install Django via pip, with

pip install Django==1.5.5

but I get the error:

File "django\utils\version.py", line 1
from __future__ import unicode_literals
SyntaxError: future feature unicode_literals is not defined

My guess is this is because pip is using the Python 2.5 version of pip. I have installed pip into Python 2.7, and have a directory structure that looks like this:

C:\Python27\Lib\site-packages\pip

Question: I know I can install Django from the .tar, but I would like pip to work so that other Python 2.7 projects can use the (much simpler) pip. What do I need to change in order for this to work?

Upvotes: 1

Views: 1003

Answers (1)

alko
alko

Reputation: 48317

Since your path is C:\Python27\Lib\site-packages\pip, I guess you're on Windows. Then which pip is invoked is controlled primarily by %PATH% system environment. Running echo %PATH% to find out which pip directory is listed first and changing variable appropriately should help. Normally, the directory you need to be searched first should be C:\Python27\Scripts, that is where pip.exe is located.

Upvotes: 3

Related Questions