Use anaconda environment without activate? (e.g. in Crontab)

a 夏天 提交于 2019-12-03 02:49:07

If conda is on your path:

source activate <env name> && python xxx.py && source deactivate

If conda isn't on your path but is installed:

source /path/to/conda/bin/activate /path/to/desired/env_name/ && python xxx.py && source deactivate

Actually, you can do exactly the same as in venv in miniconda. If path_to_miniconda is your installation dir of miniconda, then

/path_to_miniconda/envs/name_of_env/bin/python xxx.py

should work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!