Can I update to python3.7 from python2.7 in my macOS 10.14.1?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4















I have macOS 10.14.1. I installed Python3.7 but can see that python2.7 already installed in my os. Can I remove 2.7 and just keep 3.7? Will it affect other apps?










share|improve this question


























    4















    I have macOS 10.14.1. I installed Python3.7 but can see that python2.7 already installed in my os. Can I remove 2.7 and just keep 3.7? Will it affect other apps?










    share|improve this question
























      4












      4








      4








      I have macOS 10.14.1. I installed Python3.7 but can see that python2.7 already installed in my os. Can I remove 2.7 and just keep 3.7? Will it affect other apps?










      share|improve this question














      I have macOS 10.14.1. I installed Python3.7 but can see that python2.7 already installed in my os. Can I remove 2.7 and just keep 3.7? Will it affect other apps?







      macos python






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 28 at 6:05









      Kumar GauravKumar Gaurav

      212




      212




















          3 Answers
          3






          active

          oldest

          votes


















          3














          You don't need to remove one in order to install the other. You can have both python 2.7 and python 3 on your Mac. (In fact, python 2.7 is part of the OS and can't really be removed).



          You just need to make sure that you invoke the correct one, either by typing python3 on the command line, or using #!/usr/bin/env python3 in scripts.






          share|improve this answer






























            2














            You should not remove python 2.7 but you can install python 3.7. I suggest you use Anaconda and install python 3.7. After installing 3.7 be sure to create and use virtual environments. There are instructions on the internet on how to use virtual environments.






            share|improve this answer






























              0














              In the past I would have told never ever to uninstall anything installed as part of MacOS, as this is just calling for troubles. But this is a moot point now because you can't remove anything from /usr/bin anymore. Not in 10.14, not in 10.13 either. Even with sudo you can't. For example:



              /usr/bin% sudo mv zprint zprint-bis 
              mv: rename zprint to zprint-bis: Operation not permitted


              The way to go is what you did, I guess. Install python3 in /usr/local which is all yours for the taking. Then modify your PATH so that /usr/local appears before /usr/bin. The standard way to do that on MacOS is to modify /etc/paths. Here is what mine looks like:



              /usr/local/bin
              /usr/bin
              /bin
              /usr/sbin
              /sbin


              No need to modify your ~/.profile or any other shell startup script. Note that it will only get you the right PATH when running from Terminal. If you need modified PATH to be seen from a GUI app, then please follow the instructions here.






              share|improve this answer






















                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "118"
                ;
                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: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                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%2fapple.stackexchange.com%2fquestions%2f349892%2fcan-i-update-to-python3-7-from-python2-7-in-my-macos-10-14-1%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                3














                You don't need to remove one in order to install the other. You can have both python 2.7 and python 3 on your Mac. (In fact, python 2.7 is part of the OS and can't really be removed).



                You just need to make sure that you invoke the correct one, either by typing python3 on the command line, or using #!/usr/bin/env python3 in scripts.






                share|improve this answer



























                  3














                  You don't need to remove one in order to install the other. You can have both python 2.7 and python 3 on your Mac. (In fact, python 2.7 is part of the OS and can't really be removed).



                  You just need to make sure that you invoke the correct one, either by typing python3 on the command line, or using #!/usr/bin/env python3 in scripts.






                  share|improve this answer

























                    3












                    3








                    3







                    You don't need to remove one in order to install the other. You can have both python 2.7 and python 3 on your Mac. (In fact, python 2.7 is part of the OS and can't really be removed).



                    You just need to make sure that you invoke the correct one, either by typing python3 on the command line, or using #!/usr/bin/env python3 in scripts.






                    share|improve this answer













                    You don't need to remove one in order to install the other. You can have both python 2.7 and python 3 on your Mac. (In fact, python 2.7 is part of the OS and can't really be removed).



                    You just need to make sure that you invoke the correct one, either by typing python3 on the command line, or using #!/usr/bin/env python3 in scripts.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 28 at 9:12









                    benwiggybenwiggy

                    1,00739




                    1,00739























                        2














                        You should not remove python 2.7 but you can install python 3.7. I suggest you use Anaconda and install python 3.7. After installing 3.7 be sure to create and use virtual environments. There are instructions on the internet on how to use virtual environments.






                        share|improve this answer



























                          2














                          You should not remove python 2.7 but you can install python 3.7. I suggest you use Anaconda and install python 3.7. After installing 3.7 be sure to create and use virtual environments. There are instructions on the internet on how to use virtual environments.






                          share|improve this answer

























                            2












                            2








                            2







                            You should not remove python 2.7 but you can install python 3.7. I suggest you use Anaconda and install python 3.7. After installing 3.7 be sure to create and use virtual environments. There are instructions on the internet on how to use virtual environments.






                            share|improve this answer













                            You should not remove python 2.7 but you can install python 3.7. I suggest you use Anaconda and install python 3.7. After installing 3.7 be sure to create and use virtual environments. There are instructions on the internet on how to use virtual environments.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 28 at 16:33









                            jmhjmh

                            3,6881522




                            3,6881522





















                                0














                                In the past I would have told never ever to uninstall anything installed as part of MacOS, as this is just calling for troubles. But this is a moot point now because you can't remove anything from /usr/bin anymore. Not in 10.14, not in 10.13 either. Even with sudo you can't. For example:



                                /usr/bin% sudo mv zprint zprint-bis 
                                mv: rename zprint to zprint-bis: Operation not permitted


                                The way to go is what you did, I guess. Install python3 in /usr/local which is all yours for the taking. Then modify your PATH so that /usr/local appears before /usr/bin. The standard way to do that on MacOS is to modify /etc/paths. Here is what mine looks like:



                                /usr/local/bin
                                /usr/bin
                                /bin
                                /usr/sbin
                                /sbin


                                No need to modify your ~/.profile or any other shell startup script. Note that it will only get you the right PATH when running from Terminal. If you need modified PATH to be seen from a GUI app, then please follow the instructions here.






                                share|improve this answer



























                                  0














                                  In the past I would have told never ever to uninstall anything installed as part of MacOS, as this is just calling for troubles. But this is a moot point now because you can't remove anything from /usr/bin anymore. Not in 10.14, not in 10.13 either. Even with sudo you can't. For example:



                                  /usr/bin% sudo mv zprint zprint-bis 
                                  mv: rename zprint to zprint-bis: Operation not permitted


                                  The way to go is what you did, I guess. Install python3 in /usr/local which is all yours for the taking. Then modify your PATH so that /usr/local appears before /usr/bin. The standard way to do that on MacOS is to modify /etc/paths. Here is what mine looks like:



                                  /usr/local/bin
                                  /usr/bin
                                  /bin
                                  /usr/sbin
                                  /sbin


                                  No need to modify your ~/.profile or any other shell startup script. Note that it will only get you the right PATH when running from Terminal. If you need modified PATH to be seen from a GUI app, then please follow the instructions here.






                                  share|improve this answer

























                                    0












                                    0








                                    0







                                    In the past I would have told never ever to uninstall anything installed as part of MacOS, as this is just calling for troubles. But this is a moot point now because you can't remove anything from /usr/bin anymore. Not in 10.14, not in 10.13 either. Even with sudo you can't. For example:



                                    /usr/bin% sudo mv zprint zprint-bis 
                                    mv: rename zprint to zprint-bis: Operation not permitted


                                    The way to go is what you did, I guess. Install python3 in /usr/local which is all yours for the taking. Then modify your PATH so that /usr/local appears before /usr/bin. The standard way to do that on MacOS is to modify /etc/paths. Here is what mine looks like:



                                    /usr/local/bin
                                    /usr/bin
                                    /bin
                                    /usr/sbin
                                    /sbin


                                    No need to modify your ~/.profile or any other shell startup script. Note that it will only get you the right PATH when running from Terminal. If you need modified PATH to be seen from a GUI app, then please follow the instructions here.






                                    share|improve this answer













                                    In the past I would have told never ever to uninstall anything installed as part of MacOS, as this is just calling for troubles. But this is a moot point now because you can't remove anything from /usr/bin anymore. Not in 10.14, not in 10.13 either. Even with sudo you can't. For example:



                                    /usr/bin% sudo mv zprint zprint-bis 
                                    mv: rename zprint to zprint-bis: Operation not permitted


                                    The way to go is what you did, I guess. Install python3 in /usr/local which is all yours for the taking. Then modify your PATH so that /usr/local appears before /usr/bin. The standard way to do that on MacOS is to modify /etc/paths. Here is what mine looks like:



                                    /usr/local/bin
                                    /usr/bin
                                    /bin
                                    /usr/sbin
                                    /sbin


                                    No need to modify your ~/.profile or any other shell startup script. Note that it will only get you the right PATH when running from Terminal. If you need modified PATH to be seen from a GUI app, then please follow the instructions here.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Jan 28 at 22:22









                                    frapadinguefrapadingue

                                    55228




                                    55228



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Ask Different!


                                        • 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%2fapple.stackexchange.com%2fquestions%2f349892%2fcan-i-update-to-python3-7-from-python2-7-in-my-macos-10-14-1%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

                                        How to check contact read email or not when send email to Individual?

                                        Bahrain

                                        Postfix configuration issue with fips on centos 7; mailgun relay