技术:*Windows*CMD*PyCharm
所需行为:我想运行pycharm main.py
错误:
"ycharm"未被识别为内部或外部命令,可操作程序或批处理文件。
我尝试过的:我将pycharm
添加到我的PATH
中,重新启动我的计算机
注意:当我运行echo %PATH%
时,我实际上可以看到PyCharm是路径的最后一项!
C:Python39Scripts
C:Python39
C:WINDOWSsystem32
C:WINDOWS
C:WINDOWSSystem32Wbem
C:WINDOWSSystem32WindowsPowerShellv1.0
C:WINDOWSSystem32OpenSSH
C:ProgramDatachocolateybin
C:Program Files (x86)Gpg4win..GnuPGbin
C:Program Filesdotnet
C:Program FilesOpenVPNbin
C:Program Filesnodejs
C:Userssome_useranaconda3
C:Userssome_useranaconda3Librarymingw-w64bin
C:Userssome_useranaconda3Libraryusrbin
C:Userssome_useranaconda3Librarybin
C:Userssome_useranaconda3Scripts
C:Userssome_userAppDataLocalMicrosoftWindowsApps
C:Userssome_userAppDataLocalGitHubDesktopbin
C:Program FilesJavajdk-14bin
C:Userssome_userAppsMicrosoft VS Codebin
C:Userssome_userAppDataLocalMicrosoftWindowsApps
C:Userssome_userAppDataRoamingnpm
C:Program FilesJetBrainsPyCharmbin
您确定Pycharm的路径是正确的吗?您导航到C:Program FilesJetBrainsPyCharmbin
了吗?在我的情况下,路径如下:C:Program FilesJetBrainsPyCharm Community Edition 2021.1bin
要在Windows CMD中设置正确的pat,您可以执行以下操作:
set PATH=%PATH%;C:Program FilesJetBrainsPyCharm Community Edition 2021.1bin