在bash脚本

时间:2018-03-01 22:25:14

标签: python bash virtualenv

我尝试在脚本中激活No such file or directory时收到virtualenv

该项目名为hive,位于/home/sys_hive/analytics/hive

之下

我的bin目录位于/home/sys_hive/analytics/hive/hive

$ pwd
/home/sys_hive/analytics/hive/hive

$ ls 
run_scripts  utils

$ cd ..; ls
bin  include

Project structure:

  /utils
    prog.py
  /runscripts
    script.sh

在script.sh

  #!/usr/bin/env bash
  source ../../bin/activate
  python -m utils.prog -a 1 -b 2  # not sure what to do here to call prog.py
  deactivate
  1. 遇到source ../../bin/active

    的问题

    ERROR: line 3: ../../bin/activate: No such file or directory

  2. 我不确定我是否会正确调用我的python脚本

0 个答案:

没有答案