程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Django admin and Django admin Py; django-admin. Py cannot create project

編輯:Python

problem

django Beginners are using django-admin When creating a project, it is prone to errors that cannot be created , This is because many online tutorials use django-admin.py Project created , If nothing else , If you enter the same command, you will find that the project has not been created , It was opened django-admin.py This file .

reason

django-admin It's a management tool

django-admin.py It's a python file

Enter at the command line django-admin In essence, the implementation is django-admin.exe, you 're right , It's an executable , But he is not site-packages\django Under the path , Not surprisingly, you can python\Scripts See him down the path (pip The installation is like this , Other installation methods are unknown ).

resolvent

1. function django-admin startproject h1

2. since django-admin.py It's a python file , To create a project with him, you must run him , So another way to create django The project approach is to run   python ......\site-packages\django\bin\django-admin.py startproject h2

  summary

The main reason for this problem is that the environment variables are not understood , Before installing java、python When waiting for the environment, they are mindless and follow the tutorial , I also have a little knowledge of environment variables . The importance of Foundation ....

 

 

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved