擅长:python、mysql、java
<p>由于buildsystem为每个Shell命令创建一个新的Shell,您不能<code>source env/bin/activate</code>,因为这只会修改活动Shell的环境。当Shell(命令)退出时,环境就消失了。在</p>
<p>你可以做的事情:</p>
<ul>
<li><p>为每个shell命令手动提供环境(读什么
<code>activate</code>做)<code>env={...}</code></p></li>
<li><p>创建一个运行所有命令的bash脚本
一个shell(我在其他系统中所做的)</p></li>
</ul>
<p>例如</p>
<p>在myscript.sh公司名称:</p>
<pre><code>#!/bin/bash
source env/bin/activate
pip install x
python y.py
</code></pre>
<p>建筑机器人:</p>
^{pr2}$
<p><a href="http://blog.stevenmohr.de/buildbot/buildbot-and-virtualenv/" rel="nofollow">blog post about the issue</a></p>