简体   繁体   English

找不到 Django 'django-admin' 命令。 Django 版本:2.2

[英]Django 'django-admin' command not found. django version : 2.2

I'm trying to use the django-admin but sadly its not working correctly and I must use python -m django how can i fix it the commandline exception that it gives:我正在尝试使用 django-admin 但遗憾的是它无法正常工作,我必须使用python -m django如何修复它给出的命令行异常:

django-admin : The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ django-admin version
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (django-admin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I had the same problem in Arch.我在 Arch 中遇到了同样的问题。 The way to fix it is to install the package as a root sudo pip install django .修复它的方法是将软件包安装为 root sudo pip install django

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM