【已解决】CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.

简介: 【已解决】CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.

通过Xshell远程机器,代码需要创建conda虚拟环境,在虚拟环境创建完成后:

# To activate this environment, use
#
#     $ conda activate xxx
#
# To deactivate an active environment, use
#
#     $ conda deactivate
root@xxx:/workspace# conda activate xxx
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
    $ conda init <SHELL_NAME>
Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.

解决方案:

root@xxx:/workspace# source ~/anaconda3/etc/profile.d/conda.sh
bash: /root/anaconda3/etc/profile.d/conda.sh: No such file or directory
root@xxx:/workspace# source /opt/conda/etc/profile.d/conda.sh 
root@xxx:/workspace# conda activate xxx

AIEarth是一个由众多领域内专家博主共同打造的学术平台,旨在建设一个拥抱智慧未来的学术殿堂!【平台地址:https://devpress.csdn.net/aiearth】 很高兴认识你!加入我们共同进步!

目录
相关文章
|
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环境,按道理说,在终端里可以通过命令
461 0
|
Shell Windows
[记录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...
[记录condaのbug] CommandNotFoundError: Your shell has not been properly configured to use ‘conda...
|
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‘.简单解决方案
|
4天前
|
关系型数据库 MySQL Shell
备份 MySQL 的 shell 脚本(mysqldump版本)
【4月更文挑战第28天】
13 0
|
2天前
|
弹性计算 运维 监控
|
3天前
|
存储 弹性计算 运维
自动化收集员工信息的Shell脚本
【4月更文挑战第30天】
6 0
|
3天前
|
弹性计算 运维 Shell
使用shell 脚本打印图形3
【4月更文挑战第29天】
11 0
|
3天前
|
存储 弹性计算 运维
使用shell 脚本打印图形2
【4月更文挑战第29天】
11 0