[记录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

相关文章
|
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‘. 问题解决
219 0
|
Shell Linux
解决脚本文件无法执行conda命令的问题:CommandNotFoundError: Your shell has not been properly configured to use
使用Linux系统时,有时候希望利用一个脚本执行多条命令来节省时间,其中如果安装有anaconda,需要切换环境或者关闭conda环境,按道理说,在终端里可以通过命令
664 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‘.简单解决方案
1721 0
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
|
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‘.
334 0
|
23天前
|
Java Shell Linux
使用 sh -x 进行 shell 脚本调试
使用 sh -x 进行 shell 脚本调试
34 9
使用 sh -x 进行 shell 脚本调试
|
3天前
|
监控 关系型数据库 MySQL
优秀的网络工程师,早就偷偷收藏了这9 个实用 Shell 脚本!
优秀的网络工程师,早就偷偷收藏了这9 个实用 Shell 脚本!
|
13天前
|
存储 Shell 应用服务中间件
[ansible]wget批量调用shell脚本
[ansible]wget批量调用shell脚本
|
15天前
|
运维 监控 Shell
掌握100个开箱即用的Shell脚本~(附PDF)
Shell脚本是实现Linux系统管理及自动化运维所必备的重要工具。许多其它岗位的小伙伴也经常使用Shell脚本来实现某项需求。 今天分享《100个shell脚本案例》,共有55页,支持文字搜索定位,代码清晰可复制。
|
23天前
|
Shell 测试技术 Linux
Shell 脚本循环遍历日志文件中的值进行求和并计算平均值,最大值和最小值
Shell 脚本循环遍历日志文件中的值进行求和并计算平均值,最大值和最小值
29 3
|
1月前
|
JavaScript 前端开发 Shell
Shell 脚本编程保姆级教程(上)
Shell 脚本编程保姆级教程(上)