Trouble installing Django: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-rcF9a5/Django/

前端 未结 2 627
青春惊慌失措
青春惊慌失措 2020-12-07 02:47

I\'m trying to install Django via command prompt. I used pip install Django but got this message:

Collecting Django
  Using cached `Django-2.0.t         


        
相关标签:
2条回答
  • 2020-12-07 03:28

    To use Django 2.0 python 3 should be used. One way to do this is using a virtual environment. Create a python 3 virtual environment ( python3 -m venv myvenv ) and install Django 2.0 in it. Make sure to use pip from python 3 instead of 2.

    0 讨论(0)
  • 2020-12-07 03:44

    Pip is trying to install Django 2.0, which is incompatible with Python 2. You can install the latest 1.11.x release with

    pip install "Django<2"
    

    There’s an open issue on the Django ticket tracker to make pip install the correct version.

    If you are just starting out with Django, it would be much better to use Python 3, because 1.11 is the last version to support Python 2.

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