<p>另一种选择是使用<a href="https://github.com/conda/conda-pack" rel="nofollow noreferrer">conda-pack</a>。<br/>
从<a href="https://conda.github.io/conda-pack/" rel="nofollow noreferrer">documentation</a>:</p>
<blockquote>
<h1>On the source machine</h1>
<ul>
<li><p>Pack environment my_env into my_env.tar.gz<br/>
$ conda pack -n my_env</p></li>
<li><p>Pack environment my_env into out_name.tar.gz<br/>
$ conda pack -n my_env -o out_name.tar.gz</p></li>
<li><p>Pack environment located at an explicit path into my_env.tar.gz<br/>
$ conda pack -p /explicit/path/to/my_env</p></li>
</ul>
<h1>On the target machine</h1>
<ul>
<li><p>Unpack environment into directory <code>my_env</code><br/>
$ mkdir -p my_env<br/>
$ tar -xzf my_env.tar.gz -C my_env</p></li>
<li><p>Use python without activating or fixing the prefixes.<br/>
Most python libraries will work fine, but things that require prefix cleanups
will fail.<br/>
$ ./my_env/bin/python</p></li>
<li><p>Activate the environment. This adds <code>my_env/bin</code> to your path<br/>
$ source my_env/bin/activate</p></li>
<li><p>Run python from in the environment<br/>
(my_env)$ python</p></li>
<li><p>Cleanup prefixes from in the active environment.</p></li>
<li>Note that this command can also be run without activating the environment</li>
<li><p>as long as some version of python is already installed on the machine.<br/>
(my_env)$ conda-unpack</p></li>
<li><p>At this point the environment is exactly as if you installed it here</p></li>
<li><p>using conda directly. All scripts should work fine.<br/>
(my_env)$ ipython --version</p></li>
<li><p>Deactivate the environment to remove it from your path<br/>
(my_env)$ source my_env/bin/deactivate</p></li>
</ul>
</blockquote>