Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#25584 closed Bug (fixed)

Getting Invalid syntax error while installing Django 1.9a1 and 1.9b1

Reported by: Shashank Owned by: nobody
Component: Documentation Version: 1.9a1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

When I am trying to install django 1.9a1 or 1.9b1 using pip on python version 2.7.6. I am getting syntax error though installation is not getting effected because of this.

Compiling /tmp/pip_build_root/django/django/conf/app_template/apps.py ...
  File "/tmp/pip_build_root/django/django/conf/app_template/apps.py", line 4
    class {{ camel_case_app_name }}Config(AppConfig):
          ^
SyntaxError: invalid syntax

and 

Compiling /tmp/pip_build_root/django/django/conf/app_template/models.py ...
  File "/tmp/pip_build_root/django/django/conf/app_template/models.py", line 1
    {{ unicode_literals }}from django.db import models
                             ^
SyntaxError: invalid syntax

Change History (11)

comment:1 Changed 5 years ago by Tim Graham

Description: modified (diff)

comment:2 Changed 5 years ago by Tim Graham

What version of pip? I have no trouble with Python 2.7.6 and pip 7.1.2.

comment:3 Changed 5 years ago by Tim Graham

Resolution: worksforme
Status: newclosed

comment:4 Changed 5 years ago by Claude Paroz

Component: UncategorizedDocumentation
Resolution: worksforme
Status: closednew
Triage Stage: UnreviewedAccepted

I also encountered this error when using pip 1.5.6 (default version in Debian stable). I guess we should at least document that (suggesting pip install --upgrade pip?), as people do use stable software :-)

comment:5 Changed 5 years ago by Tim Graham

Has patch: set

comment:6 Changed 5 years ago by Claude Paroz

Triage Stage: AcceptedReady for checkin

comment:7 Changed 5 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In ee66d8d:

Fixed #25584 -- Documented a pip error when installing Django 1.9.

comment:8 Changed 5 years ago by Tim Graham <timograham@…>

In 02f3084f:

[1.9.x] Fixed #25584 -- Documented a pip error when installing Django 1.9.

Backport of ee66d8dd7df8326c453fd04c2bdeb5225df934be from master

comment:9 Changed 5 years ago by Tim Graham

As noted in a django-developers thread, setuptools 5.5.x is actually to blame for the warning. I'll update the note added in the above commits.

comment:10 Changed 5 years ago by Tim Graham <timograham@…>

In f5af68ba:

Refs #25584 -- Corrected note about source of SyntaxErrors when installing Django 1.9.

comment:11 Changed 5 years ago by Tim Graham <timograham@…>

In 6aaf672:

[1.9.x] Refs #25584 -- Corrected note about source of SyntaxErrors when installing Django 1.9.

Backport of f5af68ba68c1041d785e5582529134d54895e7c6 from master

Note: See TracTickets for help on using tickets.
Back to Top