• <tfoot id='JbiwC'></tfoot>

    1. <legend id='JbiwC'><style id='JbiwC'><dir id='JbiwC'><q id='JbiwC'></q></dir></style></legend>
      <i id='JbiwC'><tr id='JbiwC'><dt id='JbiwC'><q id='JbiwC'><span id='JbiwC'><b id='JbiwC'><form id='JbiwC'><ins id='JbiwC'></ins><ul id='JbiwC'></ul><sub id='JbiwC'></sub></form><legend id='JbiwC'></legend><bdo id='JbiwC'><pre id='JbiwC'><center id='JbiwC'></center></pre></bdo></b><th id='JbiwC'></th></span></q></dt></tr></i><div id='JbiwC'><tfoot id='JbiwC'></tfoot><dl id='JbiwC'><fieldset id='JbiwC'></fieldset></dl></div>
      • <bdo id='JbiwC'></bdo><ul id='JbiwC'></ul>

      <small id='JbiwC'></small><noframes id='JbiwC'>

        无法打开文件 'django-admin.py':[Errno 2] 没有这样的文件或目录

        时间:2023-11-08
            <tbody id='x1sET'></tbody>
          <legend id='x1sET'><style id='x1sET'><dir id='x1sET'><q id='x1sET'></q></dir></style></legend>
              <tfoot id='x1sET'></tfoot>

              <small id='x1sET'></small><noframes id='x1sET'>

              <i id='x1sET'><tr id='x1sET'><dt id='x1sET'><q id='x1sET'><span id='x1sET'><b id='x1sET'><form id='x1sET'><ins id='x1sET'></ins><ul id='x1sET'></ul><sub id='x1sET'></sub></form><legend id='x1sET'></legend><bdo id='x1sET'><pre id='x1sET'><center id='x1sET'></center></pre></bdo></b><th id='x1sET'></th></span></q></dt></tr></i><div id='x1sET'><tfoot id='x1sET'></tfoot><dl id='x1sET'><fieldset id='x1sET'></fieldset></dl></div>

                • <bdo id='x1sET'></bdo><ul id='x1sET'></ul>

                  本文介绍了无法打开文件 'django-admin.py':[Errno 2] 没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Python 2.7、Django 1.2.5 和 Windows 7.

                  I'm using Python 2.7, Django 1.2.5 and on Windows 7.

                  我不确定我做了什么.我曾经能够创建类似的 Django 项目

                  I am not sure what I've done. I used to be able to create Django projects like

                  python django-admin.py startproject test
                  

                  但是现在我得到了这个错误.

                  Now however I get this error.

                  无法打开文件django-admin.py":
                  [Errno 2] 没有这样的文件或目录

                  Can't open file 'django-admin.py':
                  [Errno 2] No such file or directory

                  我可以输入以下内容.

                  python C:Python27Scriptsdjango-admin.py startproject test
                  

                  我怎样才能拥有它以前的样子?没有输入 django-admin.py 文件的完整路径.

                  How can I have it the way it used to be? Not having the type the full path to the django-admin.py file.

                  我已经尝试过的事情:

                  我卸载了 Python 并手动从 Windows 中的 PATH 变量中删除了这些值.重新安装了 Python.删除 Django 并重新安装.

                  I uninstalled Python and manually removed the values from the PATH variable in Windows. Reinstalled Python. Deleted Django and reinstalled it too.

                  我已将 C:Python27Scripts 添加到 PATH环境变量 下的 PYTHONPATH 变量中在 Windows 中.

                  I've added C:Python27Scripts to my PATH and PYTHONPATH variable under Environmental Variables in Windows.

                  我的 PATH 变量包含

                  My PATH variable contains

                  C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program Files (x86)ActiveState Komodo Edit 6;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0;C:django-apps;F:My_Projects;C:Program Files (x86)QuickTimeQTSystem;C:Program FilesTortoiseSVNin;C:Program FilesMercurialin;C:Python27;C:Python27Scripts
                  

                  PYTHONPATH 有

                  PYTHONPATH has

                  C:Python27;C:Python27Lib;C:Python27DLLs;C:Python27Liblib-tk;C:Python27Scripts;C:django-apps;f:my_projects
                  

                  推荐答案

                  我在 Python 2.7.x 和 Django 的稍新版本中也遇到了同样的问题 - 这不是 PATH.这就是我在 Windows XP 中修复它所要做的全部工作:

                  I had this same problem with slightly newer versions of Python 2.7.x and Django - and it is not the PATH. This is all I had to do to fix it in Windows XP:

                  1. 找到一个 .py 文件(任意,甚至是空白).
                  2. 右键单击它并选择:打开方式>",然后选择选择程序...".
                  3. 这会弹出所有程序的列表——选择python,并勾选始终使用选定的程序打开这种文件",然后点击OK.
                  1. Find a .py file (any, even a blank).
                  2. Right click on it and choose: "Open with>" and then select "Choose program...".
                  3. This pops up a list of all programs - select python, and check the box "Always use the selected program to open this kind of file" and then click OK.

                  选中此框会重置文件关联并修复命令行的此问题.

                  Checking this box resets file associations and fixes this problem for the command line.

                  问题的原因:告诉 Windows 默认在文本编辑器中打开 .py 文件.

                  The cause of the problem: Telling Windows to open up .py files in a text editor as default.

                  这篇关于无法打开文件 'django-admin.py':[Errno 2] 没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:管理站点:TemplateDoesNotExist at/admin/ 下一篇:限制为 django admin 内联显示的条目的查询集

                  相关文章

                      <bdo id='ZhAWw'></bdo><ul id='ZhAWw'></ul>
                    1. <legend id='ZhAWw'><style id='ZhAWw'><dir id='ZhAWw'><q id='ZhAWw'></q></dir></style></legend>
                    2. <i id='ZhAWw'><tr id='ZhAWw'><dt id='ZhAWw'><q id='ZhAWw'><span id='ZhAWw'><b id='ZhAWw'><form id='ZhAWw'><ins id='ZhAWw'></ins><ul id='ZhAWw'></ul><sub id='ZhAWw'></sub></form><legend id='ZhAWw'></legend><bdo id='ZhAWw'><pre id='ZhAWw'><center id='ZhAWw'></center></pre></bdo></b><th id='ZhAWw'></th></span></q></dt></tr></i><div id='ZhAWw'><tfoot id='ZhAWw'></tfoot><dl id='ZhAWw'><fieldset id='ZhAWw'></fieldset></dl></div>
                    3. <small id='ZhAWw'></small><noframes id='ZhAWw'>

                      <tfoot id='ZhAWw'></tfoot>