通过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】 很高兴认识你!加入我们共同进步!