Move a virtualenv to another PC with different python edition










2















I have two computers running the same OS with the same login credentials; let's call them PC1 and PC2. I have a Python project M that is currently being developed on PC1.



I want to copy M from PC1 to PC2. The issue is that PC2 has no internet connection and, as such, cannot use pip to install packages. I have already tried copying the virtualenv folder from PC1 to PC2 to no avail.



Please note that making the program executable (using a tool such as PyInstaller is not an option).



Given this information, how can I copy and run M from PC1 to PC2?










share|improve this question
























  • Maybe you can create a virtualenv with same name and then replace the folder.

    – Nitin Pawar
    Nov 12 '18 at 12:58






  • 1





    You can use a tool like Docker: docker.com

    – Adam Mitchell
    Nov 12 '18 at 13:03











  • Use pip wheel -r requirements.txt and copy all the generated wheel files to the other machine. Then run pip install *.whl.

    – Klaus D.
    Nov 12 '18 at 13:19











  • good idea. One problem is that pip is not installed in PC2. Is it save to copy pip?@KlausD.

    – hengyue li
    Nov 12 '18 at 13:45















2















I have two computers running the same OS with the same login credentials; let's call them PC1 and PC2. I have a Python project M that is currently being developed on PC1.



I want to copy M from PC1 to PC2. The issue is that PC2 has no internet connection and, as such, cannot use pip to install packages. I have already tried copying the virtualenv folder from PC1 to PC2 to no avail.



Please note that making the program executable (using a tool such as PyInstaller is not an option).



Given this information, how can I copy and run M from PC1 to PC2?










share|improve this question
























  • Maybe you can create a virtualenv with same name and then replace the folder.

    – Nitin Pawar
    Nov 12 '18 at 12:58






  • 1





    You can use a tool like Docker: docker.com

    – Adam Mitchell
    Nov 12 '18 at 13:03











  • Use pip wheel -r requirements.txt and copy all the generated wheel files to the other machine. Then run pip install *.whl.

    – Klaus D.
    Nov 12 '18 at 13:19











  • good idea. One problem is that pip is not installed in PC2. Is it save to copy pip?@KlausD.

    – hengyue li
    Nov 12 '18 at 13:45













2












2








2








I have two computers running the same OS with the same login credentials; let's call them PC1 and PC2. I have a Python project M that is currently being developed on PC1.



I want to copy M from PC1 to PC2. The issue is that PC2 has no internet connection and, as such, cannot use pip to install packages. I have already tried copying the virtualenv folder from PC1 to PC2 to no avail.



Please note that making the program executable (using a tool such as PyInstaller is not an option).



Given this information, how can I copy and run M from PC1 to PC2?










share|improve this question
















I have two computers running the same OS with the same login credentials; let's call them PC1 and PC2. I have a Python project M that is currently being developed on PC1.



I want to copy M from PC1 to PC2. The issue is that PC2 has no internet connection and, as such, cannot use pip to install packages. I have already tried copying the virtualenv folder from PC1 to PC2 to no avail.



Please note that making the program executable (using a tool such as PyInstaller is not an option).



Given this information, how can I copy and run M from PC1 to PC2?







python containers virtualenv






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 14:16









Adam Mitchell

7581627




7581627










asked Nov 12 '18 at 12:55









hengyue lihengyue li

110110




110110












  • Maybe you can create a virtualenv with same name and then replace the folder.

    – Nitin Pawar
    Nov 12 '18 at 12:58






  • 1





    You can use a tool like Docker: docker.com

    – Adam Mitchell
    Nov 12 '18 at 13:03











  • Use pip wheel -r requirements.txt and copy all the generated wheel files to the other machine. Then run pip install *.whl.

    – Klaus D.
    Nov 12 '18 at 13:19











  • good idea. One problem is that pip is not installed in PC2. Is it save to copy pip?@KlausD.

    – hengyue li
    Nov 12 '18 at 13:45

















  • Maybe you can create a virtualenv with same name and then replace the folder.

    – Nitin Pawar
    Nov 12 '18 at 12:58






  • 1





    You can use a tool like Docker: docker.com

    – Adam Mitchell
    Nov 12 '18 at 13:03











  • Use pip wheel -r requirements.txt and copy all the generated wheel files to the other machine. Then run pip install *.whl.

    – Klaus D.
    Nov 12 '18 at 13:19











  • good idea. One problem is that pip is not installed in PC2. Is it save to copy pip?@KlausD.

    – hengyue li
    Nov 12 '18 at 13:45
















Maybe you can create a virtualenv with same name and then replace the folder.

– Nitin Pawar
Nov 12 '18 at 12:58





Maybe you can create a virtualenv with same name and then replace the folder.

– Nitin Pawar
Nov 12 '18 at 12:58




1




1





You can use a tool like Docker: docker.com

– Adam Mitchell
Nov 12 '18 at 13:03





You can use a tool like Docker: docker.com

– Adam Mitchell
Nov 12 '18 at 13:03













Use pip wheel -r requirements.txt and copy all the generated wheel files to the other machine. Then run pip install *.whl.

– Klaus D.
Nov 12 '18 at 13:19





Use pip wheel -r requirements.txt and copy all the generated wheel files to the other machine. Then run pip install *.whl.

– Klaus D.
Nov 12 '18 at 13:19













good idea. One problem is that pip is not installed in PC2. Is it save to copy pip?@KlausD.

– hengyue li
Nov 12 '18 at 13:45





good idea. One problem is that pip is not installed in PC2. Is it save to copy pip?@KlausD.

– hengyue li
Nov 12 '18 at 13:45












2 Answers
2






active

oldest

votes


















0















I have already tried copying the virtualenv folder from PC1 to PC2 to
no avail.




What was the error you got? Did you activate the virtualenv on PC2? Is it on the same directory level as on PC2? For the activation, you can read up here:
https://virtualenv.pypa.io/en/latest/userguide/




good idea. One problem is that pip is not installed in PC2. Is it save
to copy pip?




PIP is also installed automatically in the venv, it should be located in ENV/bin/pip






share|improve this answer






























    0














    If you are using anaconda you could proceed as follows:



    https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TJBtuWab1DE



    But as mentioned before, that's the intended usage of docker:



    https://www.docker.com/






    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262645%2fmove-a-virtualenv-to-another-pc-with-different-python-edition%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0















      I have already tried copying the virtualenv folder from PC1 to PC2 to
      no avail.




      What was the error you got? Did you activate the virtualenv on PC2? Is it on the same directory level as on PC2? For the activation, you can read up here:
      https://virtualenv.pypa.io/en/latest/userguide/




      good idea. One problem is that pip is not installed in PC2. Is it save
      to copy pip?




      PIP is also installed automatically in the venv, it should be located in ENV/bin/pip






      share|improve this answer



























        0















        I have already tried copying the virtualenv folder from PC1 to PC2 to
        no avail.




        What was the error you got? Did you activate the virtualenv on PC2? Is it on the same directory level as on PC2? For the activation, you can read up here:
        https://virtualenv.pypa.io/en/latest/userguide/




        good idea. One problem is that pip is not installed in PC2. Is it save
        to copy pip?




        PIP is also installed automatically in the venv, it should be located in ENV/bin/pip






        share|improve this answer

























          0












          0








          0








          I have already tried copying the virtualenv folder from PC1 to PC2 to
          no avail.




          What was the error you got? Did you activate the virtualenv on PC2? Is it on the same directory level as on PC2? For the activation, you can read up here:
          https://virtualenv.pypa.io/en/latest/userguide/




          good idea. One problem is that pip is not installed in PC2. Is it save
          to copy pip?




          PIP is also installed automatically in the venv, it should be located in ENV/bin/pip






          share|improve this answer














          I have already tried copying the virtualenv folder from PC1 to PC2 to
          no avail.




          What was the error you got? Did you activate the virtualenv on PC2? Is it on the same directory level as on PC2? For the activation, you can read up here:
          https://virtualenv.pypa.io/en/latest/userguide/




          good idea. One problem is that pip is not installed in PC2. Is it save
          to copy pip?




          PIP is also installed automatically in the venv, it should be located in ENV/bin/pip







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 12 '18 at 15:11









          FaulanderFaulander

          835




          835























              0














              If you are using anaconda you could proceed as follows:



              https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TJBtuWab1DE



              But as mentioned before, that's the intended usage of docker:



              https://www.docker.com/






              share|improve this answer



























                0














                If you are using anaconda you could proceed as follows:



                https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TJBtuWab1DE



                But as mentioned before, that's the intended usage of docker:



                https://www.docker.com/






                share|improve this answer

























                  0












                  0








                  0







                  If you are using anaconda you could proceed as follows:



                  https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TJBtuWab1DE



                  But as mentioned before, that's the intended usage of docker:



                  https://www.docker.com/






                  share|improve this answer













                  If you are using anaconda you could proceed as follows:



                  https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TJBtuWab1DE



                  But as mentioned before, that's the intended usage of docker:



                  https://www.docker.com/







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 12 '18 at 14:21









                  Benedict K.Benedict K.

                  358215




                  358215



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262645%2fmove-a-virtualenv-to-another-pc-with-different-python-edition%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kleinkühnau

                      Makov (Slowakei)

                      Deutsches Schauspielhaus