今天打开pycharm ,发现终端用不了,一直显示 can't open local,具体报错情况如下:
Cannot open Local
Failed to start [powershell.exe, -ExecutionPolicy, RemoteSigned, -NoExit, -File, C:/Project/RollPace_latest/venv/Scripts/activate.ps1] in C:\Project\RollPace_latest, [columns=180, rows=11], envs={IntelliJ IDEA=>C:\software\IDEA\IntelliJ IDEA 2023.2.5\bin;, CommonProgramFiles=>C:\Program Files\Common Files, ProgramData=>C:\ProgramData, COMPUTERNAME=>LAPTOP-HJKG4T7R, SystemDrive=>C:, USERDOMAIN=>LAPTOP-HJKG4T7R, OneDriveConsumer=>C:\Users\lft_h\OneDrive, OneDrive=>C:\Users\lft_h\OneDrive, CommonProgramFiles(x86)=>C:\Program Files (x86)\Common Files, TEMP=>C:\Users\lft_h\AppData\Local\Temp, TMP=>C:\Users\lft_h\AppData\Local\Temp, ProgramFiles=>C:\Program Files, USERDOMAIN_ROAMINGPROFILE=>LAPTOP-HJKG4T7R, windir=>C:\Windows, CLASSPATH=>.;C:\Program Files\Java\jdk1.8.0_301\lib\dt.jar;C:\Program Files\Java\jdk1.8.0_301\lib\tools.jar;, PROCESSOR_LEVEL=>6, JAVA_HOME=>C:\Program Files\Java\jdk1.8.0_301, ComSpec=>C:\Windows\system32\cmd.exe, NUMBER_OF_PROCESSORS=>16, PROCESSOR_ARCHITECTURE=>AMD64, OS=>Windows_NT, M2_HOME=>C:\software\eclipse\apache-maven-3.9.5, ProgramFiles(x86)=>C:\Program Files (x86), PSModulePath=>C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules, PATHEXT=>.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, PROCESSOR_IDENTIFIER=>Intel64 Family 6 Model 186 Stepping 2, GenuineIntel, APPDATA=>C:\Users\lft_h\AppData\Roaming, LOCALAPPDATA=>C:\Users\lft_h\AppData\Local, CATALINA_HOME=>C:\software\Tomcat8.0.5\apache-tomcat-8.0.5, HOMEPATH=>\Users\lft_h, SystemRoot=>C:\Windows, LOGONSERVER=>\\LAPTOP-HJKG4T7R, TERMINAL_EMULATOR=>JetBrains-JediTerm, SESSIONNAME=>Console, IGCCSVC_DB=>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA25+NjSwTWEieVnpNzKGn/gQAAAACAAAAAAAQZgAAAAEAACAAAACmK+jvvpnW8jW8KSzFCY4FXOLFBiwyuJg5HaVm8uBlIwAAAAAOgAAAAAIAACAAAADRTV8ezPKxsqPAEKEjgzPyXM/YLkAVsSaIVKYpKJpmeWAAAABR8F/l0/5u+ZWF+iqP7qe/RsTIAe/oU8qyPFUlTzpwuiIp8mCwoHg07JauANzEu3LxqQ6UTl3vvsHO45hcDHnlhjg+hWyPLDTUtmKFBpqkWYcrq/T3iM//cMsuL6DTXw5AAAAAGNZhFrWaNH48UNJ0sOFP5ZGIpIboBnv1mPTVqWOdbL9FRY/WBK82fbRdupEZxcB+Z8RdwDeRlB+ZRNa6n7eLkA==, HOMEDRIVE=>C:, DriverData=>C:\Windows\System32\Drivers\DriverData, PATH=>C:\Program Files\Java\jdk1.8.0_301\bin;C:\Program Files\Java\jdk1.8.0_301\jre\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\lft_h\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\lft_h\AppData\Local\Programs\Python\Python38\;C:\Users\lft_h\AppData\Local\Microsoft\WindowsApps;C:\Users\lft_h\AppData\Local\Programs\Microsoft VS Code\bin;C:\software\pycharm\PyCharm 2023.2\bin;;C:\Users\lft_h\.dotnet\tools;C:\software\eclipse\apache-maven-3.9.5\bin;C:\software\Tomcat8.0.5\apache-tomcat-8.0.5\bin;C:\software\Tomcat8.0.5\apache-tomcat-8.0.5\lib;C:\software\IDEA\IntelliJ IDEA 2023.2.5\bin;;, PUBLIC=>C:\Users\Public, IDEA_INITIAL_DIRECTORY=>C:\Users\lft_h\Desktop, EFC_12348=>1, PROCESSOR_REVISION=>ba02, ALLUSERSPROFILE=>C:\ProgramData, USERPROFILE=>C:\Users\lft_h, USERNAME=>lft_h, FIG_JETBRAINS_SHELL_INTEGRATION=>1, CommonProgramW6432=>C:\Program Files\Common Files, PyCharm=>C:\software\pycharm\PyCharm 2023.2\bin;, ProgramW6432=>C:\Program Files, ZES_ENABLE_SYSMAN=>1, TERM_SESSION_ID=>664b141f-dbb5-405f-9ebe-d67588f07014}
See IDE log (Help | Show Log in Explorer) for the details.
在查阅资料后,我先是在 设置了powershell路径,未解决
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
其次,又尝试了一种方法,设置cmd路径,还是未解决
我最终的解决方法是:
环境变量Path中添加了 Powershell 路径
C:\Windows\System3pndowsPowerShell\v1.0\
设置完之后记得重新打开一下pycharm 就可以了
注:
我的powershell 路径没改,如下图所示:文章来源:https://www.toymoban.com/news/detail-782993.html
文章来源地址https://www.toymoban.com/news/detail-782993.html
到了这里,关于PyCharm 本地终端用不了报错can‘t open local...(已解决)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!