参考 链接到标题
安装 Conda 后 PowerShell 启动慢 - ASC_8384 的个人博客
处理方案 链接到标题
在 PowerShell 中输入:
(& "C:\path\to\conda\Scripts\conda.exe" "shell.powershell" "hook") | Out-String
把输出的文本贴到 profile.ps1 中,例如:
$Env:CONDA_EXE = "C:\Users\username\miniconda3\Scripts\conda.exe"
$Env:_CE_M = ""
$Env:_CE_CONDA = ""
$Env:_CONDA_ROOT = "C:\Users\username\miniconda3"
$Env:_CONDA_EXE = "C:\Users\username\miniconda3\Scripts\conda.exe"
$CondaModuleArgs = @{ChangePs1 = $True }
Import-Module "$Env:_CONDA_ROOT\shell\condabin\Conda.psm1" -ArgumentList $CondaModuleArgs
conda activate base #去掉这一行,默认不随Powershell激活Conda环境
Remove-Variable CondaModuleArgs