Need to remove anaconda3 from $PATH












2















I imagine this is probably a duplicate, but I'm fairly new to Linux and all the other guides I've already checked seem to be referring to something different. I installed anaconda3 and accidentally told it to update the path variable. This is messing with all sorts of things for obvious reasons. When I which python I get /home/sbendl/anaconda3/bin/python,



and if I echo $PATH I get:



 /home/sbendl/anaconda3/bin:/opt/ros/kinetic/bin:/home/sbendl/bin:/home/sbendl/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


but when I look at /etc/environment I don't see anything at all related to those. Clearly I'm confusing two different things. I would like to be able to continue using Python 3.5 when needed, but I want the default to be 2.7 so that I can use anything else that assumes 2.7.










share|improve this question





























    2















    I imagine this is probably a duplicate, but I'm fairly new to Linux and all the other guides I've already checked seem to be referring to something different. I installed anaconda3 and accidentally told it to update the path variable. This is messing with all sorts of things for obvious reasons. When I which python I get /home/sbendl/anaconda3/bin/python,



    and if I echo $PATH I get:



     /home/sbendl/anaconda3/bin:/opt/ros/kinetic/bin:/home/sbendl/bin:/home/sbendl/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


    but when I look at /etc/environment I don't see anything at all related to those. Clearly I'm confusing two different things. I would like to be able to continue using Python 3.5 when needed, but I want the default to be 2.7 so that I can use anything else that assumes 2.7.










    share|improve this question



























      2












      2








      2








      I imagine this is probably a duplicate, but I'm fairly new to Linux and all the other guides I've already checked seem to be referring to something different. I installed anaconda3 and accidentally told it to update the path variable. This is messing with all sorts of things for obvious reasons. When I which python I get /home/sbendl/anaconda3/bin/python,



      and if I echo $PATH I get:



       /home/sbendl/anaconda3/bin:/opt/ros/kinetic/bin:/home/sbendl/bin:/home/sbendl/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


      but when I look at /etc/environment I don't see anything at all related to those. Clearly I'm confusing two different things. I would like to be able to continue using Python 3.5 when needed, but I want the default to be 2.7 so that I can use anything else that assumes 2.7.










      share|improve this question
















      I imagine this is probably a duplicate, but I'm fairly new to Linux and all the other guides I've already checked seem to be referring to something different. I installed anaconda3 and accidentally told it to update the path variable. This is messing with all sorts of things for obvious reasons. When I which python I get /home/sbendl/anaconda3/bin/python,



      and if I echo $PATH I get:



       /home/sbendl/anaconda3/bin:/opt/ros/kinetic/bin:/home/sbendl/bin:/home/sbendl/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


      but when I look at /etc/environment I don't see anything at all related to those. Clearly I'm confusing two different things. I would like to be able to continue using Python 3.5 when needed, but I want the default to be 2.7 so that I can use anything else that assumes 2.7.







      python environment-variables






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 30 '17 at 22:10









      George Udosen

      20.6k94467




      20.6k94467










      asked Jan 30 '17 at 21:46









      bendlbendl

      11315




      11315






















          2 Answers
          2






          active

          oldest

          votes


















          -1














          To completely remove anaconda from your path:





          • Check for the anaconda entry in both ~/.bashrc and ~/.bash_profile and remove the line:



            export PATH="/home/sbendl/anaconda2/bin:$PATH"



          For complete removal:




          • Remove the entries in the files stated above then get rid of the ~/anaconda2 dir.


          And that should correct the issue.






          share|improve this answer

































            -1














            Anaconda is added to the PATH for all users in the /etc/profile file. This can be verified with:



            $ cat /etc/profile | grep anaconda
            export PATH=/opt/anaconda/bin:$PATH


            To remove it simply comment out the line by preceding it with the # character. Editing this file likely needs sudo:



            $ sudo pico /etc/profile


            If a particular user requires Anaconda, the export command can be added to the user's .bashrc or .profile file.






            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%2f878068%2fneed-to-remove-anaconda3-from-path%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














              To completely remove anaconda from your path:





              • Check for the anaconda entry in both ~/.bashrc and ~/.bash_profile and remove the line:



                export PATH="/home/sbendl/anaconda2/bin:$PATH"



              For complete removal:




              • Remove the entries in the files stated above then get rid of the ~/anaconda2 dir.


              And that should correct the issue.






              share|improve this answer






























                -1














                To completely remove anaconda from your path:





                • Check for the anaconda entry in both ~/.bashrc and ~/.bash_profile and remove the line:



                  export PATH="/home/sbendl/anaconda2/bin:$PATH"



                For complete removal:




                • Remove the entries in the files stated above then get rid of the ~/anaconda2 dir.


                And that should correct the issue.






                share|improve this answer




























                  -1












                  -1








                  -1







                  To completely remove anaconda from your path:





                  • Check for the anaconda entry in both ~/.bashrc and ~/.bash_profile and remove the line:



                    export PATH="/home/sbendl/anaconda2/bin:$PATH"



                  For complete removal:




                  • Remove the entries in the files stated above then get rid of the ~/anaconda2 dir.


                  And that should correct the issue.






                  share|improve this answer















                  To completely remove anaconda from your path:





                  • Check for the anaconda entry in both ~/.bashrc and ~/.bash_profile and remove the line:



                    export PATH="/home/sbendl/anaconda2/bin:$PATH"



                  For complete removal:




                  • Remove the entries in the files stated above then get rid of the ~/anaconda2 dir.


                  And that should correct the issue.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 1 '17 at 15:15

























                  answered Jan 30 '17 at 22:07









                  George UdosenGeorge Udosen

                  20.6k94467




                  20.6k94467

























                      -1














                      Anaconda is added to the PATH for all users in the /etc/profile file. This can be verified with:



                      $ cat /etc/profile | grep anaconda
                      export PATH=/opt/anaconda/bin:$PATH


                      To remove it simply comment out the line by preceding it with the # character. Editing this file likely needs sudo:



                      $ sudo pico /etc/profile


                      If a particular user requires Anaconda, the export command can be added to the user's .bashrc or .profile file.






                      share|improve this answer




























                        -1














                        Anaconda is added to the PATH for all users in the /etc/profile file. This can be verified with:



                        $ cat /etc/profile | grep anaconda
                        export PATH=/opt/anaconda/bin:$PATH


                        To remove it simply comment out the line by preceding it with the # character. Editing this file likely needs sudo:



                        $ sudo pico /etc/profile


                        If a particular user requires Anaconda, the export command can be added to the user's .bashrc or .profile file.






                        share|improve this answer


























                          -1












                          -1








                          -1







                          Anaconda is added to the PATH for all users in the /etc/profile file. This can be verified with:



                          $ cat /etc/profile | grep anaconda
                          export PATH=/opt/anaconda/bin:$PATH


                          To remove it simply comment out the line by preceding it with the # character. Editing this file likely needs sudo:



                          $ sudo pico /etc/profile


                          If a particular user requires Anaconda, the export command can be added to the user's .bashrc or .profile file.






                          share|improve this answer













                          Anaconda is added to the PATH for all users in the /etc/profile file. This can be verified with:



                          $ cat /etc/profile | grep anaconda
                          export PATH=/opt/anaconda/bin:$PATH


                          To remove it simply comment out the line by preceding it with the # character. Editing this file likely needs sudo:



                          $ sudo pico /etc/profile


                          If a particular user requires Anaconda, the export command can be added to the user's .bashrc or .profile file.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 18 at 8:07









                          Luís de SousaLuís de Sousa

                          8,994175199




                          8,994175199






























                              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%2f878068%2fneed-to-remove-anaconda3-from-path%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

                              數位音樂下載

                              When can things happen in Etherscan, such as the picture below?

                              格利澤436b