我试图通过画中画安装Django,与PIP使用Python 2.5,需要使用Python 2.7
pip install Django==1.5.5
,但我得到的错误:
File "django\utils\version.py", line 1
from __future__ import unicode_literals
SyntaxError: future feature unicode_literals is not defined
我的猜测是这是因为pip使用了Python 2.5版本的pip。我已经安装了PIP成Python 2.7,并且有一个看起来像这样的目录结构:
C:\Python27\Lib\site-packages\pip
问题:我知道我可以从压缩.tar安装Django,但我想点子的工作,以便其他Python 2.7项目可以使用(更简单)点。为了实现这个目标,我需要改变什么?
您是否尝试过使用easy_install?另外,你是否使用虚拟环境? –
着眼于设置virtualenv&virtualenvwrapper-win。 – cryptojuice
[This answer](http://stackoverflow.com/a/5226504/2689986)&[this question](http://stackoverflow.com/questions/13472942/make-pip-install-package-for-specific- python-installation?rq = 1)可能会有所帮助。 –