powershell - 撤消 Conda Powershell 提示修改

标签 powershell conda

Conda 4.6.14从以下位置覆盖我的默认 PowerShell 提示:

C:\whatevs\okay>

到:
(env) PS>

但我最想要的是以前的样子:
(env) C:\whatevs\okay>

如何撤消对 PowerShell 提示符的更改?我喜欢知道每次执行命令时我使用的路径和 Conda 环境!有我可以更改的设置吗?

我知道可以修改 PowerShell prompt by editing $profile .但是,我想保留 (env) .是否有一些快速的方法可以获取当前的 Conda 环境,以便我可以将其包含到自定义路径中?

细节
conda init 正在修改的文件是 $HOME\Documents\WindowsPowerShell\profile.ps1谁的内容是:

#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "C:\Users\user\Anaconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion

最佳答案

这是 an issue with Conda 4.6.14 并且可以通过降级回 4.6.12 来解决或 upgrade to the (currently) experimental 4.7 .

关于powershell - 撤消 Conda Powershell 提示修改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55923854/

相关文章:

JAVA 从 linux 执行 powershell 脚本

sql - Powershell Get-QADUser 结果到 SQL 表

arrays - powershell多维数组和foreach

powershell - 如何使用 PowerShell 从任务计划程序中删除文件夹?

python - 捕获当前 python 环境的快照并在另一台机器上重新创建

python - 从 pypi 包构建 conda 骨架会抛出错误

arrays - 在 PowerShell 中快速将文件写入哈希表

conda - prompt-toolkit 和 prompt_toolkit 有什么区别

python - conda 从环境文件创建与 conda 克隆

python - conda install h3 导入时仍然失败