There are what seem to be dozens of questions about "why does pip raise SyntaxError?" and all the answers are "run it from the system shell, not the python shell." This isn't one of those questions. I installed django-import-export using pip, and got a number of SyntaxErrors in the output. The module itself seems to work fine, just wondering what's up with the SystaxErrors.
Here's the entire output:
c:\Dev\Website>pip install django-import-export
Downloading/unpacking django-import-export
Running setup.py (path:c:\users\username\appdata\local\temp\pip_build_username\django-import-export\setup.py) egg_info for pac
kage django-import-export
Downloading/unpacking tablib (from django-import-export)
Downloading/unpacking diff-match-patch (from django-import-export)
Running setup.py (path:c:\users\username\appdata\local\temp\pip_build_username\diff-match-patch\setup.py) egg_info for package
diff-match-patch
Installing collected packages: django-import-export, tablib, diff-match-patch
Running setup.py install for django-import-export
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\__init__.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\__init__.py", line 855
print("mem: %s, base: %d, len: %d" % (type(self.mem), self.base, self.stream_len), file=self.logfile)
^
SyntaxError: invalid syntax
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\biffh.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\biffh.py", line 386
print(header, file=f)
^
SyntaxError: invalid syntax
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\compdoc.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\compdoc.py", line 89
print("\nCompDoc format: version=0x%04x revision=0x%04x" % (version, revision), file=logfile)
^
SyntaxError: invalid syntax
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\formatting.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\formatting.py", line 589
print("%2d: %r -> %r" % (i, old_rgb, new_rgb), file=book.logfile)
^
SyntaxError: invalid syntax
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\formula.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\formula.py", line 794
if verbose: print("tIsect pre", stack, file=bk.logfile)
^
SyntaxError: invalid syntax
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\sheet.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlrd3\sheet.py", line 466
print("put_cell", rowx, colx, file=self.logfile)
^
SyntaxError: invalid syntax
Compiling c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlwt3\antlr.py ...
File "c:\users\username\appdata\local\temp\pip_build_username\tablib\tablib\packages\xlwt3\antlr.py", line 1946
print(fmt % (line,col,text), file=sys.stderr)
^
SyntaxError: invalid syntax
Running setup.py install for diff-match-patch
Successfully installed django-import-export tablib diff-match-patch
Cleaning up...
c:\Dev\Website>python -c "import import_export; print(import_export)"
<module 'import_export' from 'C:\Python27\lib\site-packages\import_export\__init__.pyc'>