shell篇—切换路径,激活conda并启动程序
#!/bin/bash
source /home/efc/.bashrc
cd /home/efc/app/object_detection_basic
conda activate py_37 && python app.py
注意:要加 source /home/efc/.bashrc, 不然会出现以下错误
(base) [efc@localhost object_detection_basic]$ ./my_shell.sh
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'.