conda在powershell7.5执行出现问题
问题描述
执行命令结果如下,不能达到预期
bash
conda
usage: conda-script.py [-h] [-v] [--no-plugins] [-V] COMMAND ...
conda-script.py: error: argument COMMAND: invalid choice: '' (choose from 'activate', 'clean', 'commands', 'compare', 'config', 'create', 'deactivate', 'env', 'export', 'info', 'init', 'install', 'list', 'notices', 'package', 'build', 'content-trust', 'convert', 'debug', 'develop', 'doctor', 'index', 'inspect', 'metapackage', 'render', 'repoquery', 'skeleton', 'pack', 'repo', 'token', 'server', 'remove', 'uninstall', 'rename', 'run', 'search', 'update', 'upgrade')
原因
升级版本后引起的问题,具体等修复
解决方法
powershell版本降级,到Release v7.4.7 Release of PowerShell · PowerShell/PowerShell下载msi文件,安装老版本,7.5无所谓删不删,若要删除建议先备份"C:\Users\xxx\Documents\PowerShell"目录下的文件,这是所有配置文件,微软商店下载的powershell和github安装的powershell共用这个配置文件
参考
标题: PowerShell 7.5.0 中的 Conda 环境激活问题 ·问题 #24942 ·PowerShell/PowerShell
Conda does not run as expected on PowerShell 7.5.0 · Issue #24869 · PowerShell/PowerShell