[记录condaのbug] CommandNotFoundError: Your shell has not been properly configured to use ‘conda...

简介: [记录condaのbug] CommandNotFoundError: Your shell has not been properly configured to use ‘conda...

问题

运行vscode当中的conda activate env出现报错

conda.bat : 无法将“conda.bat”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然    
后再试一次。
所在位置 行:1 字符: 1
+ conda.bat activate "D:\ProgramData\Anaconda3"
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (conda.bat:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


以为是环境变量问题,执行了conda init 之后仍然报错,但是单独运行conda -V无误

> conda -V
conda 4.12.0


运行window自带的Power SHELL冒出来一行红色报错

无法加载文件 C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1,因为在此


这里,这样解决:

win10找到Windows Powershell后以管理员身份打开,输入:

get-ExecutionPolicy   # 查看系统执行策略状态


再执行:

set-executionpolicy remotesigned # 修改执行策略状态

重启vscode ,报错消失,成功进入conda环境。

41c2f22fd27b4d6c87a678a5f2d6d13e.png

相关文章
|
9月前
|
Shell Linux C++
报错:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘. 问题解决
报错:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘. 问题解决
167 0
|
9月前
|
Shell Linux
解决脚本文件无法执行conda命令的问题:CommandNotFoundError: Your shell has not been properly configured to use
使用Linux系统时,有时候希望利用一个脚本执行多条命令来节省时间,其中如果安装有anaconda,需要切换环境或者关闭conda环境,按道理说,在终端里可以通过命令
460 0
|
Shell
【已解决】CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.
【已解决】CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.
307 0
|
Shell
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
1608 0
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
|
3天前
|
关系型数据库 MySQL Shell
备份 MySQL 的 shell 脚本(mysqldump版本)
【4月更文挑战第28天】
10 0
|
1天前
|
弹性计算 运维 监控
|
2天前
|
弹性计算 运维 Shell
使用shell 脚本打印图形3
【4月更文挑战第29天】
9 0
|
2天前
|
存储 弹性计算 运维
使用shell 脚本打印图形2
【4月更文挑战第29天】
8 0
|
2天前
|
弹性计算 运维 Shell
使用shell 脚本打印图形1
【4月更文挑战第29天】
7 0
|
2天前
|
存储 弹性计算 运维
调整虚拟机内存参数的shell 脚本
【4月更文挑战第29天】
6 0