我正在尝试使用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
我使用这个命令: django-admin startproject Hello 来启动一个新项目,但我收到以下错误 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 tr
我已经使用virtualenvwrapper命令mkvirtualenv -a <path to project> django_project初始化了一个虚拟环境。
然后我用pip install django安装了django。但是如果我尝试使用django-admin,我会得到:
Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 7, in <module>
from django.core.management import execute_fr
我已经在我的计算机上安装了django,但是当我试图在我的终端上运行任何django-admin命令时,我会得到以下错误:
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 ag
我的mac上有zsh。我按照你在这里推荐的django-admin command not working in Mac OS做了简单链接,所以在我的目录/usr/local/bin中,我有另一个文件夹bin,里面有__pycache__ django-admin.py文件。 但是仍然存在相同的问题,我收到了django-admin和django-admin.py的zsh: command not found 有没有别的人选?我是编程和计算机科学的新手: Python 3.8 Django 2.1
当我尝试运行django-admin命令时,它失败了,并显示以下错误。 $ django-admin startproject pyshop
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
在我的Dockerfile中:
ENV PROJECTNAME mytestwebsite
CMD ["django-admin", "startproject", "$PROJECTNAME"]
错误:
CommandError: '$PROJECTNAME' is not a valid project name
这里最快的办法是什么?Docker是否计划在较后版本的Docker中“修复”或引入此功能?
注意:如果我从Docker文件中删除CMD行,然后运行Docker容器,我就能够从容器内部手动运行Django-admin
我对django非常陌生,我想知道我是否能得到一些帮助,我正在浏览django网站上的指南,在终端运行了这个命令之后,我开始用...\> django-admin startproject mysite启动一个新项目,我得到了一个错误的信息。
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
我安装了一个名为Scaffold的应用程序,它在使用python manage.py runserver时运行得很好,但是当我尝试使用django-admin启动它时,它就失败了;
You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
我试着用django-admin migrate --settings=scaffold.settings调用它,然后我得到;ImportError: No mod
我超级迷失和沮丧。不知道下一步该做什么。请谁帮帮我,这是我问的最后一个问题。我尝试了所有的选项,但都不起作用。
fatgezimbela@MacBook-Pro-2 ~ % pip3 install django==3.0.3
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/559
但是它已经安装好了,因为当我运行时
python -m django --version
它显示了
1.10.1。
但是,当我尝试启动某个项目django-admin startproject mysite或使用django-admin --version检查版本时,如下所示
The program 'django-admin' is currently not installed. You can install it by typing:
sudo apt-get install python-django`
我用的是ubuntu 14.04。我是django的新手,我只是