• <tfoot id='Bod7u'></tfoot>
      <bdo id='Bod7u'></bdo><ul id='Bod7u'></ul>

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

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

      1. Python/python3 在命令提示符下执行,但运行不正确

        时间:2023-10-19

              <bdo id='PhLX5'></bdo><ul id='PhLX5'></ul>

                <tbody id='PhLX5'></tbody>
              <tfoot id='PhLX5'></tfoot>

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

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

                1. 本文介绍了Python/python3 在命令提示符下执行,但运行不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I've solved the issue and am posting to save others from my hours of pain.

                  Problem

                  On Windows 10,

                  Python is installed in C:Python and added to Environment Variables, but will not properly run programs.

                  Typing python myscript.py in CMD does not run the program but does not produce any errors.

                  Typing C:Pythonpython.exe myscript.py correctly runs the code.

                  Solution

                  Navigate to C:UsersUsernameAppDataLocalMicrosoftWindowsAppspython.exe in CMD and type del /f python.exe.

                  What was wrong

                  The file located at C:UsersMyUsernameAppDataLocalMicrosoftWindowsAppspython.exe is viewed before the Environment Variables in PATH. This file just opens the download page for Python in Edge.

                  You need to delete this file or rename it, but the items in this folder are protected by Microsoft. You get Error 0x80070780 if you try to delete this file with file explorer. In order to delete it you need to navigate to the folder in CMD with administrator privileges and type the above to remove this file.

                  I hope this helps someone.

                  Edit

                  While the solution I originally posted seems to work for people. I would recommend the solution posted by Max:

                  https://stackoverflow.com/a/65520328/9407750

                  解决方案

                  Just noticed there's an additional python executable in the windowsApp folder too when running where python.

                  To remove those you can do it in the App execution aliases in windows setting and uncheck the python aliases.

                  Image of the App execution aliases setting here as I am not able to embed picture in answer due to low reputation point

                  这篇关于Python/python3 在命令提示符下执行,但运行不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何让 pydoc 命令在 Windows 中工作? 下一篇:如何使 Django 自定义管理命令参数不需要?

                  相关文章

                2. <legend id='TN69s'><style id='TN69s'><dir id='TN69s'><q id='TN69s'></q></dir></style></legend>

                  <tfoot id='TN69s'></tfoot>

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

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