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了

相关推荐
Molesidy1 天前
【VSCode】【Clangd】Win下的基于LLVM/Clangd+Clangd插件+MINGW+CMake的VSCode配置C/C++开发环境的详细教程
c++·ide·vscode·clangd·llvm
zbhbbedp282793cl1 天前
如何在VSCode中安装Python扩展?
ide·vscode·python
天天向上10241 天前
markdown及vscode中可以的emoji
ide·vscode·编辑器
小明_GLC1 天前
关于新项目在PyCharm中自动构建UV环境的问题
ide·pycharm·uv
Joyce_JTR1 天前
【vscode】vscode上plantuml安装和使用
ide·vscode·编辑器
lichong9511 天前
Android studio release 包打包配置 build.gradle
android·前端·ide·flutter·android studio·大前端·大前端++
Theliars1 天前
Ubuntu 上使用 VSCode 调试 C++ (CMake 项目) 指南
c++·vscode·ubuntu·cmake
听风吟丶1 天前
Java 9 + 模块化系统实战:从 Jar 地狱到模块解耦的架构升级
开发语言·python·pycharm
香香爱编程1 天前
Electron里的electron-window-state 使用
前端·javascript·vue.js·vscode·electron·前端框架
2501_930412272 天前
如何添加清华源到Conda?
开发语言·python·conda