python - django install errors on MAC OSX - Yosemite -
i using pip install django on mac osx yosemite , running following errors during install process
_^[root:~/development]# pip2.6 install django downloading/unpacking django downloading django-1.8-py2.py3-none-any.whl (6.2mb): 6.2mb downloaded installing collected packages: django compiling /private/tmp/pip_build_root/django/django/contrib/admin/filters.py ... syntaxerror: ('invalid syntax', ('/private/tmp/pip_build_root/django/django/contrib/admin/filters.py', 298, 36, ' self.date_params = {k: v k, v in params.items()\n')) compiling /private/tmp/pip_build_root/django/django/contrib/admin/views/main.py ... syntaxerror: ('invalid syntax', ('/private/tmp/pip_build_root/django/django/contrib/admin/views/main.py', 281, 38, " if not (set(ordering) & {'pk', '-pk', pk_name, '-' + pk_name}):\n")) compiling /private/tmp/pip_build_root/django/django/contrib/auth/hashers.py ... syntaxerror: ('invalid syntax', ('/private/tmp/pip_build_root/django/django/contrib/auth/hashers.py', 94, 40, ' return {hasher.algorithm: hasher hasher in get_hashers()}\n'))
the installation reports completed fine.
compiling /private/tmp/pip_build_root/django/django/views/debug.py ... syntaxerror: ('invalid syntax', ('/private/tmp/pip_build_root/django/django/views/debug.py', 64, 56, ' cleansed = {k: cleanse_setting(k, v) k, v in value.items()}\n')) installed django cleaning up...
there 2 python versions installed on mac client, python2.6 , python2.7.
does have clue why happening? running pip install command root.
as mike suggested, django 1.8 supported in 2.7 , 3.2, 3.3, 3.4. you'll need use newer version of python, or install older version of django:
pip install django==1.4