【发布时间】:2017-03-08 23:30:28
【问题描述】:
我正在使用 vagrant(MacOSX Sierra 上的 1.9.1)在 VirtualBox 上配置 ubuntu/xenial64 框以运行 python 应用程序。我无法在配置时使用普通的 shell 命令source 激活 conda 环境。在我的bootstrap.sh 中,我有以下几行来创建一个新环境,然后切换到它。
#!/usr/bin/env bash
set -e # Exit script immediately on first error.
set -x # Print commands and their arguments as they are executed.
/home/ubuntu/miniconda3/bin/conda create --name envmycondaenvironment python=3.5 # environment with python3.5
source activate envgatherurls
我从 vagrant 收到以下错误。
==> default: + source activate envmycondaenvironment
==> default: /tmp/vagrant-shell: line 21: activate: No such file or directory
为什么shell脚本找不到activate?我验证了/home/ubuntu/miniconda3/bin/ 可以找到activate 的位置已添加到.bashrc 文件的PATH 中。
【问题讨论】:
标签: shell vagrant vagrantfile vagrant-provision miniconda