How to transfer Anaconda env installed on one machine to another? [Both with Ubuntu installed]












3














i have been using Anaconda(4.3.23) on my GuestOS ubuntu 14.04 which is installed on Vmware on HostOS windows 8.1. i have setup an environment in anaconda and have installed many libraries, some of which were very hectic to install (not straight forward pip installs). few libraries had inner dependencies and had to be build together and from their git source.



Problem
i am going to use Cloud based VM (Azure GPU instance) to use GPU. but i don't want to get into the hectic installation again as i don't want to waste money on the time it will take me to install all the packages and libraries again



Is there any way to transfer/copy my existing env (which has everything already installed) to the Cloud VM.?










share|improve this question






















  • You should be able to do conda list --export > requirements.txt and then on your new environment do conda create --name [env name] --file requirements.txt
    – gobrewers14
    Aug 24 '17 at 14:53










  • wouldn't that only work if the packages and libraries are out of the shelf and to be installed from pip?. by your method i will have the name list of packages. and in new env those packages will be installed from pip again. but the problem is i have custom built packages which had dependent configurations with each other
    – Qaisar Rajput
    Aug 24 '17 at 15:00


















3














i have been using Anaconda(4.3.23) on my GuestOS ubuntu 14.04 which is installed on Vmware on HostOS windows 8.1. i have setup an environment in anaconda and have installed many libraries, some of which were very hectic to install (not straight forward pip installs). few libraries had inner dependencies and had to be build together and from their git source.



Problem
i am going to use Cloud based VM (Azure GPU instance) to use GPU. but i don't want to get into the hectic installation again as i don't want to waste money on the time it will take me to install all the packages and libraries again



Is there any way to transfer/copy my existing env (which has everything already installed) to the Cloud VM.?










share|improve this question






















  • You should be able to do conda list --export > requirements.txt and then on your new environment do conda create --name [env name] --file requirements.txt
    – gobrewers14
    Aug 24 '17 at 14:53










  • wouldn't that only work if the packages and libraries are out of the shelf and to be installed from pip?. by your method i will have the name list of packages. and in new env those packages will be installed from pip again. but the problem is i have custom built packages which had dependent configurations with each other
    – Qaisar Rajput
    Aug 24 '17 at 15:00
















3












3








3


1





i have been using Anaconda(4.3.23) on my GuestOS ubuntu 14.04 which is installed on Vmware on HostOS windows 8.1. i have setup an environment in anaconda and have installed many libraries, some of which were very hectic to install (not straight forward pip installs). few libraries had inner dependencies and had to be build together and from their git source.



Problem
i am going to use Cloud based VM (Azure GPU instance) to use GPU. but i don't want to get into the hectic installation again as i don't want to waste money on the time it will take me to install all the packages and libraries again



Is there any way to transfer/copy my existing env (which has everything already installed) to the Cloud VM.?










share|improve this question













i have been using Anaconda(4.3.23) on my GuestOS ubuntu 14.04 which is installed on Vmware on HostOS windows 8.1. i have setup an environment in anaconda and have installed many libraries, some of which were very hectic to install (not straight forward pip installs). few libraries had inner dependencies and had to be build together and from their git source.



Problem
i am going to use Cloud based VM (Azure GPU instance) to use GPU. but i don't want to get into the hectic installation again as i don't want to waste money on the time it will take me to install all the packages and libraries again



Is there any way to transfer/copy my existing env (which has everything already installed) to the Cloud VM.?







python ubuntu anaconda virtualenv conda






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 24 '17 at 14:44









Qaisar Rajput

243214




243214












  • You should be able to do conda list --export > requirements.txt and then on your new environment do conda create --name [env name] --file requirements.txt
    – gobrewers14
    Aug 24 '17 at 14:53










  • wouldn't that only work if the packages and libraries are out of the shelf and to be installed from pip?. by your method i will have the name list of packages. and in new env those packages will be installed from pip again. but the problem is i have custom built packages which had dependent configurations with each other
    – Qaisar Rajput
    Aug 24 '17 at 15:00




















  • You should be able to do conda list --export > requirements.txt and then on your new environment do conda create --name [env name] --file requirements.txt
    – gobrewers14
    Aug 24 '17 at 14:53










  • wouldn't that only work if the packages and libraries are out of the shelf and to be installed from pip?. by your method i will have the name list of packages. and in new env those packages will be installed from pip again. but the problem is i have custom built packages which had dependent configurations with each other
    – Qaisar Rajput
    Aug 24 '17 at 15:00


















You should be able to do conda list --export > requirements.txt and then on your new environment do conda create --name [env name] --file requirements.txt
– gobrewers14
Aug 24 '17 at 14:53




You should be able to do conda list --export > requirements.txt and then on your new environment do conda create --name [env name] --file requirements.txt
– gobrewers14
Aug 24 '17 at 14:53












wouldn't that only work if the packages and libraries are out of the shelf and to be installed from pip?. by your method i will have the name list of packages. and in new env those packages will be installed from pip again. but the problem is i have custom built packages which had dependent configurations with each other
– Qaisar Rajput
Aug 24 '17 at 15:00






wouldn't that only work if the packages and libraries are out of the shelf and to be installed from pip?. by your method i will have the name list of packages. and in new env those packages will be installed from pip again. but the problem is i have custom built packages which had dependent configurations with each other
– Qaisar Rajput
Aug 24 '17 at 15:00














2 Answers
2






active

oldest

votes


















1














From the very end of this documentation page:



Save packages for future use:



conda list --export > package-list.txt


Reinstall packages from an export file:



conda create -n myenv --file package-list.txt





share|improve this answer





























    0
















    If conda list --export failes like this ...



    Executing conda list --export > package-list.txt creates a file which looks like this:



    # This file may be used to create an environment using:
    # $ conda create --name <env> --file <this file>
    # platform: win-64
    _tflow_1100_select=0.0.1=gpu
    absl-py=0.5.0=py_0
    astor=0.7.1=py_0
    ...


    But creating a new environment by executing conda create -n myenv --file package-list.txt gives me this error:



    Solving environment: ...working... failed

    PackagesNotFoundError: The following packages are not available from current channels:

    - markdown==2.6.11=py_0
    ...




    ... then try to use conda env export



    According to this discussion execute the following command on your source machine:



    source activate yourEnvironment
    conda env export --no-builds > file.txt


    On the target machine execute:



    conda env create --file /path/to/file.txt


    The file generated by conda env export looks a bit different, but it contains pip packages as well:



    name: yourEnvironment
    channels:
    - conda-forge
    - defaults
    dependencies:
    - absl-py=0.5.0
    ...
    - pip:
    - astroid==2.0.4
    ...





    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%2f45864595%2fhow-to-transfer-anaconda-env-installed-on-one-machine-to-another-both-with-ubu%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









      1














      From the very end of this documentation page:



      Save packages for future use:



      conda list --export > package-list.txt


      Reinstall packages from an export file:



      conda create -n myenv --file package-list.txt





      share|improve this answer


























        1














        From the very end of this documentation page:



        Save packages for future use:



        conda list --export > package-list.txt


        Reinstall packages from an export file:



        conda create -n myenv --file package-list.txt





        share|improve this answer
























          1












          1








          1






          From the very end of this documentation page:



          Save packages for future use:



          conda list --export > package-list.txt


          Reinstall packages from an export file:



          conda create -n myenv --file package-list.txt





          share|improve this answer












          From the very end of this documentation page:



          Save packages for future use:



          conda list --export > package-list.txt


          Reinstall packages from an export file:



          conda create -n myenv --file package-list.txt






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 12 at 0:35









          Miladiouss

          492414




          492414

























              0
















              If conda list --export failes like this ...



              Executing conda list --export > package-list.txt creates a file which looks like this:



              # This file may be used to create an environment using:
              # $ conda create --name <env> --file <this file>
              # platform: win-64
              _tflow_1100_select=0.0.1=gpu
              absl-py=0.5.0=py_0
              astor=0.7.1=py_0
              ...


              But creating a new environment by executing conda create -n myenv --file package-list.txt gives me this error:



              Solving environment: ...working... failed

              PackagesNotFoundError: The following packages are not available from current channels:

              - markdown==2.6.11=py_0
              ...




              ... then try to use conda env export



              According to this discussion execute the following command on your source machine:



              source activate yourEnvironment
              conda env export --no-builds > file.txt


              On the target machine execute:



              conda env create --file /path/to/file.txt


              The file generated by conda env export looks a bit different, but it contains pip packages as well:



              name: yourEnvironment
              channels:
              - conda-forge
              - defaults
              dependencies:
              - absl-py=0.5.0
              ...
              - pip:
              - astroid==2.0.4
              ...





              share|improve this answer


























                0
















                If conda list --export failes like this ...



                Executing conda list --export > package-list.txt creates a file which looks like this:



                # This file may be used to create an environment using:
                # $ conda create --name <env> --file <this file>
                # platform: win-64
                _tflow_1100_select=0.0.1=gpu
                absl-py=0.5.0=py_0
                astor=0.7.1=py_0
                ...


                But creating a new environment by executing conda create -n myenv --file package-list.txt gives me this error:



                Solving environment: ...working... failed

                PackagesNotFoundError: The following packages are not available from current channels:

                - markdown==2.6.11=py_0
                ...




                ... then try to use conda env export



                According to this discussion execute the following command on your source machine:



                source activate yourEnvironment
                conda env export --no-builds > file.txt


                On the target machine execute:



                conda env create --file /path/to/file.txt


                The file generated by conda env export looks a bit different, but it contains pip packages as well:



                name: yourEnvironment
                channels:
                - conda-forge
                - defaults
                dependencies:
                - absl-py=0.5.0
                ...
                - pip:
                - astroid==2.0.4
                ...





                share|improve this answer
























                  0












                  0








                  0








                  If conda list --export failes like this ...



                  Executing conda list --export > package-list.txt creates a file which looks like this:



                  # This file may be used to create an environment using:
                  # $ conda create --name <env> --file <this file>
                  # platform: win-64
                  _tflow_1100_select=0.0.1=gpu
                  absl-py=0.5.0=py_0
                  astor=0.7.1=py_0
                  ...


                  But creating a new environment by executing conda create -n myenv --file package-list.txt gives me this error:



                  Solving environment: ...working... failed

                  PackagesNotFoundError: The following packages are not available from current channels:

                  - markdown==2.6.11=py_0
                  ...




                  ... then try to use conda env export



                  According to this discussion execute the following command on your source machine:



                  source activate yourEnvironment
                  conda env export --no-builds > file.txt


                  On the target machine execute:



                  conda env create --file /path/to/file.txt


                  The file generated by conda env export looks a bit different, but it contains pip packages as well:



                  name: yourEnvironment
                  channels:
                  - conda-forge
                  - defaults
                  dependencies:
                  - absl-py=0.5.0
                  ...
                  - pip:
                  - astroid==2.0.4
                  ...





                  share|improve this answer














                  If conda list --export failes like this ...



                  Executing conda list --export > package-list.txt creates a file which looks like this:



                  # This file may be used to create an environment using:
                  # $ conda create --name <env> --file <this file>
                  # platform: win-64
                  _tflow_1100_select=0.0.1=gpu
                  absl-py=0.5.0=py_0
                  astor=0.7.1=py_0
                  ...


                  But creating a new environment by executing conda create -n myenv --file package-list.txt gives me this error:



                  Solving environment: ...working... failed

                  PackagesNotFoundError: The following packages are not available from current channels:

                  - markdown==2.6.11=py_0
                  ...




                  ... then try to use conda env export



                  According to this discussion execute the following command on your source machine:



                  source activate yourEnvironment
                  conda env export --no-builds > file.txt


                  On the target machine execute:



                  conda env create --file /path/to/file.txt


                  The file generated by conda env export looks a bit different, but it contains pip packages as well:



                  name: yourEnvironment
                  channels:
                  - conda-forge
                  - defaults
                  dependencies:
                  - absl-py=0.5.0
                  ...
                  - pip:
                  - astroid==2.0.4
                  ...






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 19 at 23:21









                  John Johnson

                  13610




                  13610






























                      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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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%2f45864595%2fhow-to-transfer-anaconda-env-installed-on-one-machine-to-another-both-with-ubu%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

                      "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                      Alcedinidae

                      RAC Tourist Trophy