1. <tfoot id='vgxyZ'></tfoot>
    2. <small id='vgxyZ'></small><noframes id='vgxyZ'>

        <bdo id='vgxyZ'></bdo><ul id='vgxyZ'></ul>
      <legend id='vgxyZ'><style id='vgxyZ'><dir id='vgxyZ'><q id='vgxyZ'></q></dir></style></legend>
    3. <i id='vgxyZ'><tr id='vgxyZ'><dt id='vgxyZ'><q id='vgxyZ'><span id='vgxyZ'><b id='vgxyZ'><form id='vgxyZ'><ins id='vgxyZ'></ins><ul id='vgxyZ'></ul><sub id='vgxyZ'></sub></form><legend id='vgxyZ'></legend><bdo id='vgxyZ'><pre id='vgxyZ'><center id='vgxyZ'></center></pre></bdo></b><th id='vgxyZ'></th></span></q></dt></tr></i><div id='vgxyZ'><tfoot id='vgxyZ'></tfoot><dl id='vgxyZ'><fieldset id='vgxyZ'></fieldset></dl></div>

      将完整的 virtualenv 复制到另一台电脑

      时间:2023-08-31
      <legend id='uOroj'><style id='uOroj'><dir id='uOroj'><q id='uOroj'></q></dir></style></legend>
    4. <i id='uOroj'><tr id='uOroj'><dt id='uOroj'><q id='uOroj'><span id='uOroj'><b id='uOroj'><form id='uOroj'><ins id='uOroj'></ins><ul id='uOroj'></ul><sub id='uOroj'></sub></form><legend id='uOroj'></legend><bdo id='uOroj'><pre id='uOroj'><center id='uOroj'></center></pre></bdo></b><th id='uOroj'></th></span></q></dt></tr></i><div id='uOroj'><tfoot id='uOroj'></tfoot><dl id='uOroj'><fieldset id='uOroj'></fieldset></dl></div>

          • <bdo id='uOroj'></bdo><ul id='uOroj'></ul>

              <tbody id='uOroj'></tbody>
            <tfoot id='uOroj'></tfoot>
            1. <small id='uOroj'></small><noframes id='uOroj'>

                本文介绍了将完整的 virtualenv 复制到另一台电脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个位于 /home/user/virtualenvs/Environmentvirtualenv.现在我需要在另一台 PC 上使用这个环境.所以我安装了 virtualenv-clone 并用它来克隆 /Environment.然后我通过USB将它复制到另一台PC.我可以使用 source activate 激活它,但是当我尝试使用 sudo ./Environment/bin/python 启动 python 解释器时,我得到了

                I have a virtualenv located at /home/user/virtualenvs/Environment. Now I need this environment at another PC. So I installed virtualenv-clone and used it to clone /Environment. Then I copied it to the other PC via USB. I can activate it with source activate, but when I try to start the python interpreter with sudo ./Environment/bin/python I get

                ./bin/python: 1: ./bin/python: Syntax Error: "(" unexpected
                

                在没有 sudo 的情况下执行它会给我一个错误,告诉我二进制格式存在错误.但这怎么可能呢?我只是复制它.还是有更好的方法来做到这一点?我不能只使用 pip freeze 因为在 /Environment/lib/python2.7/site-packages/ 中有一些包是我自己写的,我需要复制它们, 也.据我了解 pip freeze 只是创建一个包列表,然后 pip 下载并安装.

                Executing it without sudo gives me an error telling me that there is an error in the binaries format. But how can this be? I just copied it. Or is there a better way to do this? I can not just use pip freeze because there are some packages in /Environment/lib/python2.7/site-packages/ which I wrote myself and I need to copy them, too. As I understand it pip freeze just creates a list of packages which pip then downloads and installs.

                推荐答案

                在源机器上执行以下步骤:

                1. 工作 [环境名称]
                2. pip freeze > requirements.txt
                3. 将 requirements.txt 复制到其他电脑

                在另一台电脑上:

                1. 使用 mkvirtualenv [environment_name] 创建一个虚拟环境
                2. 工作 [环境名称]
                3. pip install -r requirements.txt

                你应该完成了.

                • 如何复制/克隆从服务器到本地机器的虚拟环境

                这篇关于将完整的 virtualenv 复制到另一台电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:python将文件复制到Windows上的网络位置而不映射驱动器 下一篇:视图和 numpy 数组的浅拷贝有什么区别?

                相关文章

                    <bdo id='Wo2OM'></bdo><ul id='Wo2OM'></ul>
                  <tfoot id='Wo2OM'></tfoot>
                1. <i id='Wo2OM'><tr id='Wo2OM'><dt id='Wo2OM'><q id='Wo2OM'><span id='Wo2OM'><b id='Wo2OM'><form id='Wo2OM'><ins id='Wo2OM'></ins><ul id='Wo2OM'></ul><sub id='Wo2OM'></sub></form><legend id='Wo2OM'></legend><bdo id='Wo2OM'><pre id='Wo2OM'><center id='Wo2OM'></center></pre></bdo></b><th id='Wo2OM'></th></span></q></dt></tr></i><div id='Wo2OM'><tfoot id='Wo2OM'></tfoot><dl id='Wo2OM'><fieldset id='Wo2OM'></fieldset></dl></div>

                  <legend id='Wo2OM'><style id='Wo2OM'><dir id='Wo2OM'><q id='Wo2OM'></q></dir></style></legend>

                  1. <small id='Wo2OM'></small><noframes id='Wo2OM'>