我过去用过Django,但刚拿到这台新电脑,正在运行Django教程,复习一下。运行python www.example.com runserver命令时出现问题manage.py。我明白了“巨蟒不是被发现的;运行.....”错误。我试过py,python,python3。我已经确保我的路径变量设置正确。我真的不知道下一步该尝试什么。唯一不同的是在这台电脑上比其他电脑我用的是我的用户名已被设置为(用户名.计算机名)不是真的确定,但它已经搞砸了一些代码,我用来获得用户的文件目录。我添加了一个路径变量,我的完整路径,而不是%USERPROFILE%的情况下,这是影响的东西。Path VariblesImage of CMD我还看了“管理应用程序执行别名”,并点击了python。提前感谢任何帮助
以下是我从CMD得到的:
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>py --version Python 3.11.4
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>python --version Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>python3 --version Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>where py C:\Windows\py.exe
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>where python C:\Users\jlr.DESKTOP-4N4QMUN\AppData\Local\Microsoft\WindowsApps\python.exe C:\Users\jlr.DESKTOP-4N4QMUN\AppData\Local\Programs\Python\Python311\python.exe
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>where python3 C:\Users\jlr.DESKTOP-4N4QMUN\AppData\Local\Microsoft\WindowsApps\python3.exe
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>py manage.py runserver Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>python manage.py runserver Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
C:\Users\jlr.DESKTOP-4N4QMUN\Documents\GitHub\Tracker_Reporting>python3 manage.py runserver Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
1条答案
按热度按时间blmhpbnm1#
我在管理应用程序执行中关闭了Python。它现在正在工作,仍然是相当新的这一点,不知道为什么解决了它,但我很好去!
干杯