django 运行py、python3、python等有问题,环境变量是正确的,据我所知

oknrviil  于 2023-06-25  发布在  Go
关注(0)|答案(1)|浏览(110)

我过去用过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.
blmhpbnm

blmhpbnm1#

我在管理应用程序执行中关闭了Python。它现在正在工作,仍然是相当新的这一点,不知道为什么解决了它,但我很好去!
干杯

相关问题