Python: Anaconda path only added on demand





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















The situation is the following:




  • So far I have only used pip to install any package I needed or also
    apt-get sometimes. I have installed things like tensorflow with gpu
    support and things like that. At least at the time I installed this I
    was not aware of an easy way to install tensorflow in anaconda with
    gpu support, so I decided to just install it on the regular/standard
    python.

  • Now and for the future I intend to use anaconda. But I do not want to
    lose easy access to my old python libraries, but also not have to
    reinstall everything in anaconda.

  • Now I installed anaconda. But when I now open Jupyter notebook I am
    in the conda python, as I have added the conda path.


Is there maybe an easy way to achieve the following: When I open a terminal, all I need to do is type a quick command that will only then add the anaconda path?



This is to achieve that when I just open the terminal and type jupyter notebook, my go to python distribution will be the distribution where I installed tensorflow and stuff. And then I can easily use the command to enter the anaconda environments.



The following line in the .bashrc will add the conda path:



$ export PATH=~/anaconda2/bin:$PATH


So my question probably boils down to this: Is there a way to link this with some sort of command? So that the following would happen if I open a terminal:



jupyter notebook


--> jupyter notebook starts, NOT using anaconda. But when I do:



command_that_adds_the_anaconda_path
jupyter notebook


--> jupyter notebook starts, using anaconda



Big thanks in advance. I am rather new to shell stuff. Any link to how to create such a command will be much appreciated. I looked for it, maybe using the wrong words, but haven't found exactly this.










share|improve this question




















  • 2





    Your question is kind of a wall of text. Do you think you could add some formatting to make it easier to read? See here for an example of good formatting.

    – Android Dev
    May 4 '17 at 12:39


















1















The situation is the following:




  • So far I have only used pip to install any package I needed or also
    apt-get sometimes. I have installed things like tensorflow with gpu
    support and things like that. At least at the time I installed this I
    was not aware of an easy way to install tensorflow in anaconda with
    gpu support, so I decided to just install it on the regular/standard
    python.

  • Now and for the future I intend to use anaconda. But I do not want to
    lose easy access to my old python libraries, but also not have to
    reinstall everything in anaconda.

  • Now I installed anaconda. But when I now open Jupyter notebook I am
    in the conda python, as I have added the conda path.


Is there maybe an easy way to achieve the following: When I open a terminal, all I need to do is type a quick command that will only then add the anaconda path?



This is to achieve that when I just open the terminal and type jupyter notebook, my go to python distribution will be the distribution where I installed tensorflow and stuff. And then I can easily use the command to enter the anaconda environments.



The following line in the .bashrc will add the conda path:



$ export PATH=~/anaconda2/bin:$PATH


So my question probably boils down to this: Is there a way to link this with some sort of command? So that the following would happen if I open a terminal:



jupyter notebook


--> jupyter notebook starts, NOT using anaconda. But when I do:



command_that_adds_the_anaconda_path
jupyter notebook


--> jupyter notebook starts, using anaconda



Big thanks in advance. I am rather new to shell stuff. Any link to how to create such a command will be much appreciated. I looked for it, maybe using the wrong words, but haven't found exactly this.










share|improve this question




















  • 2





    Your question is kind of a wall of text. Do you think you could add some formatting to make it easier to read? See here for an example of good formatting.

    – Android Dev
    May 4 '17 at 12:39














1












1








1


1






The situation is the following:




  • So far I have only used pip to install any package I needed or also
    apt-get sometimes. I have installed things like tensorflow with gpu
    support and things like that. At least at the time I installed this I
    was not aware of an easy way to install tensorflow in anaconda with
    gpu support, so I decided to just install it on the regular/standard
    python.

  • Now and for the future I intend to use anaconda. But I do not want to
    lose easy access to my old python libraries, but also not have to
    reinstall everything in anaconda.

  • Now I installed anaconda. But when I now open Jupyter notebook I am
    in the conda python, as I have added the conda path.


Is there maybe an easy way to achieve the following: When I open a terminal, all I need to do is type a quick command that will only then add the anaconda path?



This is to achieve that when I just open the terminal and type jupyter notebook, my go to python distribution will be the distribution where I installed tensorflow and stuff. And then I can easily use the command to enter the anaconda environments.



The following line in the .bashrc will add the conda path:



$ export PATH=~/anaconda2/bin:$PATH


So my question probably boils down to this: Is there a way to link this with some sort of command? So that the following would happen if I open a terminal:



jupyter notebook


--> jupyter notebook starts, NOT using anaconda. But when I do:



command_that_adds_the_anaconda_path
jupyter notebook


--> jupyter notebook starts, using anaconda



Big thanks in advance. I am rather new to shell stuff. Any link to how to create such a command will be much appreciated. I looked for it, maybe using the wrong words, but haven't found exactly this.










share|improve this question
















The situation is the following:




  • So far I have only used pip to install any package I needed or also
    apt-get sometimes. I have installed things like tensorflow with gpu
    support and things like that. At least at the time I installed this I
    was not aware of an easy way to install tensorflow in anaconda with
    gpu support, so I decided to just install it on the regular/standard
    python.

  • Now and for the future I intend to use anaconda. But I do not want to
    lose easy access to my old python libraries, but also not have to
    reinstall everything in anaconda.

  • Now I installed anaconda. But when I now open Jupyter notebook I am
    in the conda python, as I have added the conda path.


Is there maybe an easy way to achieve the following: When I open a terminal, all I need to do is type a quick command that will only then add the anaconda path?



This is to achieve that when I just open the terminal and type jupyter notebook, my go to python distribution will be the distribution where I installed tensorflow and stuff. And then I can easily use the command to enter the anaconda environments.



The following line in the .bashrc will add the conda path:



$ export PATH=~/anaconda2/bin:$PATH


So my question probably boils down to this: Is there a way to link this with some sort of command? So that the following would happen if I open a terminal:



jupyter notebook


--> jupyter notebook starts, NOT using anaconda. But when I do:



command_that_adds_the_anaconda_path
jupyter notebook


--> jupyter notebook starts, using anaconda



Big thanks in advance. I am rather new to shell stuff. Any link to how to create such a command will be much appreciated. I looked for it, maybe using the wrong words, but haven't found exactly this.







command-line python anaconda






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 4 '17 at 13:53







Robin

















asked May 4 '17 at 12:36









RobinRobin

1319




1319








  • 2





    Your question is kind of a wall of text. Do you think you could add some formatting to make it easier to read? See here for an example of good formatting.

    – Android Dev
    May 4 '17 at 12:39














  • 2





    Your question is kind of a wall of text. Do you think you could add some formatting to make it easier to read? See here for an example of good formatting.

    – Android Dev
    May 4 '17 at 12:39








2




2





Your question is kind of a wall of text. Do you think you could add some formatting to make it easier to read? See here for an example of good formatting.

– Android Dev
May 4 '17 at 12:39





Your question is kind of a wall of text. Do you think you could add some formatting to make it easier to read? See here for an example of good formatting.

– Android Dev
May 4 '17 at 12:39










1 Answer
1






active

oldest

votes


















0














export PATH=~/anaconda2/bin:$PATH. When run in a terminal session (as opposed to from ~/.profile or ~/.bashrc), it will only affect that session and its child processes.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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%2faskubuntu.com%2fquestions%2f911801%2fpython-anaconda-path-only-added-on-demand%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    export PATH=~/anaconda2/bin:$PATH. When run in a terminal session (as opposed to from ~/.profile or ~/.bashrc), it will only affect that session and its child processes.






    share|improve this answer




























      0














      export PATH=~/anaconda2/bin:$PATH. When run in a terminal session (as opposed to from ~/.profile or ~/.bashrc), it will only affect that session and its child processes.






      share|improve this answer


























        0












        0








        0







        export PATH=~/anaconda2/bin:$PATH. When run in a terminal session (as opposed to from ~/.profile or ~/.bashrc), it will only affect that session and its child processes.






        share|improve this answer













        export PATH=~/anaconda2/bin:$PATH. When run in a terminal session (as opposed to from ~/.profile or ~/.bashrc), it will only affect that session and its child processes.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        GeorgelementalGeorgelemental

        1392214




        1392214






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f911801%2fpython-anaconda-path-only-added-on-demand%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

            GameSpot

            connect to host localhost port 22: Connection refused

            Getting a Wifi WPA2 wifi connection