VSCode/PyCharm解决“无法加载文件 ***\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本”

解决"无法加载文件 ***\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本"

博主在使用pycharm终端想用 Conda 初始化 Windows PowerShell 终端时

powershell 复制代码
conda init powershell

报错:无法加载文件 ***\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本

查阅发现VSCode也有这个问题,应该是因为都用的Windows自带的PowerShell。评论区有人给出的命令可以解决此问题

powershell 复制代码
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

执行命令后,再执行conda init powershell关掉终端重新打开就OK了

相关推荐
Robot_Nav2 小时前
AI 编程助手 Skill 完全指南:VS Code · Trae CN · Claude Code
人工智能·vscode·skill·trae·claude code
lifewange3 小时前
Pycharm和IDEA中安装Cursor的方法
ide·pycharm·intellij-idea
Echo_NGC22374 小时前
【论文解读】Attention Is All You Need —— AI 时代的“开山之作“,经典中的经典(transformer小白导读)
人工智能·python·深度学习·神经网络·机器学习·conda·transformer
何中应5 小时前
Conda安装&使用
python·conda·python3.11
生而为虫5 小时前
在VScode中使用Claude Code agent并配置模型(仅mac电脑实际操作,windows电脑未实际操作如有问题可留言)
windows·vscode·macos
读书札记20221 天前
visual studio 调试技巧总结
ide·visual studio
lifewange1 天前
Claude Code可以安装在IDEA和Pycharm中么
java·pycharm·intellij-idea
lifewange1 天前
OpenCode可以安装在IDEA和Pycharm中么
java·pycharm·intellij-idea
hacker7071 天前
Visual Studio安装教程(C#开发版)
ide·c#·visual studio
千码君20161 天前
flutter: 分享一下基于trae cn 构建的过程
java·vscode·flutter·kotlin·trae