Command not found: django-admin.py

前端 未结 27 1843
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 02:40

I am a complete beginner to Python/Django, but I want to dive right in and start experimenting. Thus I was following this guide on installing Python/Django http://devcenter.

相关标签:
27条回答
  • 2020-12-03 03:17

    To Windows users

    using django-admin instead of django-admin.py worked for me in Windows.

    0 讨论(0)
  • 2020-12-03 03:17

    This simply worked for me. Install django on your virtualenv:

    pip install django
    

    And then run:

    django-admin startproject myprojectname
    
    0 讨论(0)
  • 2020-12-03 03:17

    On RHEL stock python config:

    django-admin.py startproject mysite

    0 讨论(0)
  • 2020-12-03 03:19

    For Windows Users first search for django-admin, right click on the file that has been found and open file location and keep it open.

    Using Windows Powershell, cd into the the folder where you want to create your django project

    when your in the right folder write the full path of where django-admin is located in my case I am using Anaconda 3 so the file location is

    C:\Users\Sen\Anaconda3\Scripts

    so in Windows PowerShell type C:\Users\Sen\Anaconda3\Scripts\django-admin.py startproject [name of project]

    hope this helps!

    0 讨论(0)
  • 2020-12-03 03:21

    If you´re on Windows, here´s what worked for me (using pylauncher):

    $ py -m django startproject myproject
    
    0 讨论(0)
  • 2020-12-03 03:22

    To windows users out there: I have faced this problem several times and here are the checkpoints:

    When there is problem initiating a new project, make sure:

    1) python is working in the command line (type in python and see if you get the console)

    2) specify the full path of django-admin.py in the command

    3) check django-admin.py is in the system path

    4) cd the command line path to where you want the new project

    Screenshot of what finally worked for me (only the last command): https://flic.kr/p/r9LJ67 (stackoverflow doesn't allow me to post pictures yet)

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