Django 1.9 Compiling Error

前端 未结 4 885
独厮守ぢ
独厮守ぢ 2020-12-20 22:27

I created a virtualenv and downloaded Django with the below commands:

virtualenv tester
source tester/bin/activate
pip install django

and b

相关标签:
4条回答
  • 2020-12-20 22:33

    Those can't, and shouldn't, be fixed. Those are template files which are substituted at project creation time, and are not valid Python syntax. They shouldn't be compiled at install time but rather at project creation time.

    0 讨论(0)
  • 2020-12-20 22:37

    pip install -U pip ran fine but didn't fix my issue

    • I got the same message when I was trying pip install django.
    • I thought to try a previous version so I tried pip install django-1.9.
    • It said "Real name of requirement Django-1.9 is django-503".
    • So pip install Django-503 worked fine for me.
    0 讨论(0)
  • 2020-12-20 22:45

    These steps worked for me:

    $ sudo python -m pip install --upgrade --force setuptools
    $ sudo python -m pip install --upgrade --force pip
    $ sudo pip install django==1.9
    
    0 讨论(0)
  • 2020-12-20 22:50

    This looks like the setuptools issue mentioned in the Django 1.9 release notes: https://docs.djangoproject.com/en/1.9/releases/1.9/#syntaxerror-when-installing-django-setuptools-5-5-x

    Try to run pip install --upgrade pip before running pip install django

    0 讨论(0)
提交回复
热议问题