PyCharm 本地终端用不了报错can‘t open local...(已解决)

今天打开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 路径没改,如下图所示:

相关推荐
老刘莱国瑞27 分钟前
STM32 与 AS608 指纹模块的调试与应用
python·物联网·阿里云
一只敲代码的猪1 小时前
Llama 3 模型系列解析(一)
大数据·python·llama
Hello_WOAIAI2 小时前
批量将 Word 文件转换为 HTML:Python 实现指南
python·html·word
winfredzhang2 小时前
使用Python开发PPT图片提取与九宫格合并工具
python·powerpoint·提取·九宫格·照片
矩阵推荐官hy147622 小时前
短视频矩阵系统种类繁多,应该如何对比选择?
人工智能·python·矩阵·流量运营
测试19982 小时前
外包干了2年,技术退步明显....
自动化测试·软件测试·python·功能测试·测试工具·面试·职场和发展
码银2 小时前
【python】银行客户流失预测预处理部分,独热编码·标签编码·数据离散化处理·数据筛选·数据分割
开发语言·python
小木_.3 小时前
【python 逆向分析某有道翻译】分析有道翻译公开的密文内容,webpack类型,全程扣代码,最后实现接口调用翻译,仅供学习参考
javascript·python·学习·webpack·分享·逆向分析
R-sz3 小时前
14: curl#6 - “Could not resolve host: mirrorlist.centos.org; 未知的错误“
linux·python·centos
CITY_OF_MO_GY3 小时前
Pytorch常用内置优化器合集
人工智能·pytorch·python