How To Get IPython Notebook To Run Python 3?












89















I am new to Python to bear with me.




  1. I installed Anaconda, works great.

  2. I setup a Python 3 environment following the Anaconda cmd line instructions, works great.

  3. I setup Anaconda's Python 3 environment as Pycharm's interpreter, works great.

  4. I launched the Anaconda "launcher.app" and launched IPython Notebook. However, iPython Notebook is running Python 2 not 3.


Over three hours of Googling later, I cannot figure out how to set IPython Notebook to run Python 3 instead of 2.










share|improve this question




















  • 1





    You need to launch it from your Python 3 environment. That's easy at a command line (/path/to/env/bin/ipython), but I don't know how to do it from the Anaconda GUI launcher.

    – Thomas K
    Dec 3 '13 at 22:19






  • 2





    Awesome. Thanks. For future searchers, here was the solution: export PATH=/Users/[insertusername]/anaconda/envs/py3k/bin:$PATH ipython notebook

    – Anton
    Dec 3 '13 at 22:28








  • 4





    SO should let you answer your own question after a while, so it's clear from search results that it was resolved.

    – Thomas K
    Dec 4 '13 at 19:30
















89















I am new to Python to bear with me.




  1. I installed Anaconda, works great.

  2. I setup a Python 3 environment following the Anaconda cmd line instructions, works great.

  3. I setup Anaconda's Python 3 environment as Pycharm's interpreter, works great.

  4. I launched the Anaconda "launcher.app" and launched IPython Notebook. However, iPython Notebook is running Python 2 not 3.


Over three hours of Googling later, I cannot figure out how to set IPython Notebook to run Python 3 instead of 2.










share|improve this question




















  • 1





    You need to launch it from your Python 3 environment. That's easy at a command line (/path/to/env/bin/ipython), but I don't know how to do it from the Anaconda GUI launcher.

    – Thomas K
    Dec 3 '13 at 22:19






  • 2





    Awesome. Thanks. For future searchers, here was the solution: export PATH=/Users/[insertusername]/anaconda/envs/py3k/bin:$PATH ipython notebook

    – Anton
    Dec 3 '13 at 22:28








  • 4





    SO should let you answer your own question after a while, so it's clear from search results that it was resolved.

    – Thomas K
    Dec 4 '13 at 19:30














89












89








89


21






I am new to Python to bear with me.




  1. I installed Anaconda, works great.

  2. I setup a Python 3 environment following the Anaconda cmd line instructions, works great.

  3. I setup Anaconda's Python 3 environment as Pycharm's interpreter, works great.

  4. I launched the Anaconda "launcher.app" and launched IPython Notebook. However, iPython Notebook is running Python 2 not 3.


Over three hours of Googling later, I cannot figure out how to set IPython Notebook to run Python 3 instead of 2.










share|improve this question
















I am new to Python to bear with me.




  1. I installed Anaconda, works great.

  2. I setup a Python 3 environment following the Anaconda cmd line instructions, works great.

  3. I setup Anaconda's Python 3 environment as Pycharm's interpreter, works great.

  4. I launched the Anaconda "launcher.app" and launched IPython Notebook. However, iPython Notebook is running Python 2 not 3.


Over three hours of Googling later, I cannot figure out how to set IPython Notebook to run Python 3 instead of 2.







python python-3.x ipython ipython-notebook






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 8 '13 at 3:31









minrk

26.8k67471




26.8k67471










asked Dec 3 '13 at 19:49









AntonAnton

1,68252441




1,68252441








  • 1





    You need to launch it from your Python 3 environment. That's easy at a command line (/path/to/env/bin/ipython), but I don't know how to do it from the Anaconda GUI launcher.

    – Thomas K
    Dec 3 '13 at 22:19






  • 2





    Awesome. Thanks. For future searchers, here was the solution: export PATH=/Users/[insertusername]/anaconda/envs/py3k/bin:$PATH ipython notebook

    – Anton
    Dec 3 '13 at 22:28








  • 4





    SO should let you answer your own question after a while, so it's clear from search results that it was resolved.

    – Thomas K
    Dec 4 '13 at 19:30














  • 1





    You need to launch it from your Python 3 environment. That's easy at a command line (/path/to/env/bin/ipython), but I don't know how to do it from the Anaconda GUI launcher.

    – Thomas K
    Dec 3 '13 at 22:19






  • 2





    Awesome. Thanks. For future searchers, here was the solution: export PATH=/Users/[insertusername]/anaconda/envs/py3k/bin:$PATH ipython notebook

    – Anton
    Dec 3 '13 at 22:28








  • 4





    SO should let you answer your own question after a while, so it's clear from search results that it was resolved.

    – Thomas K
    Dec 4 '13 at 19:30








1




1





You need to launch it from your Python 3 environment. That's easy at a command line (/path/to/env/bin/ipython), but I don't know how to do it from the Anaconda GUI launcher.

– Thomas K
Dec 3 '13 at 22:19





You need to launch it from your Python 3 environment. That's easy at a command line (/path/to/env/bin/ipython), but I don't know how to do it from the Anaconda GUI launcher.

– Thomas K
Dec 3 '13 at 22:19




2




2





Awesome. Thanks. For future searchers, here was the solution: export PATH=/Users/[insertusername]/anaconda/envs/py3k/bin:$PATH ipython notebook

– Anton
Dec 3 '13 at 22:28







Awesome. Thanks. For future searchers, here was the solution: export PATH=/Users/[insertusername]/anaconda/envs/py3k/bin:$PATH ipython notebook

– Anton
Dec 3 '13 at 22:28






4




4





SO should let you answer your own question after a while, so it's clear from search results that it was resolved.

– Thomas K
Dec 4 '13 at 19:30





SO should let you answer your own question after a while, so it's clear from search results that it was resolved.

– Thomas K
Dec 4 '13 at 19:30












8 Answers
8






active

oldest

votes


















94














To set IPython Notebook to run Python 3 instead of 2 on my MAC 10.9, I did the following steps



$ sudo pip3 install ipython[all]


Then



$ ipython3 notebook







share|improve this answer





















  • 2





    You shouldn't ever have to use sudo with pip (or pip3)

    – s g
    Aug 10 '17 at 22:24






  • 2





    Why [all] on the end? pip3 install ipython worked for me.

    – Stu Cox
    Jan 27 '18 at 8:06



















8














For linux 16.04 Ubuntu you can use



sudo apt-get install ipython3


and then use



ipython3 notebook


to open the notebook in the browser. If you have any notebooks saved with python 2 then it will automatically convert them to Python 3 once you open the notebook.






share|improve this answer































    4














    Is there a package from your distro? If you're using ubuntu you must to install the ipython3-notebook package.
    If not, maybe you must to install ipython with python3.



    If you've run (because it's python2 by default)



    python setup.py


    you must to run instead



    python3 setup.py install


    to install a package with python3 instead python2.
    This will be a new instalation of ipython3.






    share|improve this answer

































      1














      In Anaconda "launcher.app" there is “Environment:” pull down menu.
      The default environment is called "root". In order to launch application using another environment, just select the desired environment from the list, to make it active.






      share|improve this answer































        1














        If you are running anaconda, then the preferred way to install notebook/jupyter is using conda:



        conda install jupyter





        share|improve this answer































          1














          To use jupyter with python 3 instead of python 2 on my Windows 10 with Anaconda, I did the following steps on anaconda prompt:



          pip3 install ipython[all]


          Then,



          ipython3 notebook





          share|improve this answer

































            0














            If you have both version available on jupyter notebook, you can change the kernel from menu.






            share|improve this answer































              0














              Another solution would be to create a virtualenv with python3:



              From this environment, install tensorflow (the version you prefer) there:



              pip install tensorflow


              Run your jupyter from there !






              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%2f20360293%2fhow-to-get-ipython-notebook-to-run-python-3%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                8 Answers
                8






                active

                oldest

                votes








                8 Answers
                8






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                94














                To set IPython Notebook to run Python 3 instead of 2 on my MAC 10.9, I did the following steps



                $ sudo pip3 install ipython[all]


                Then



                $ ipython3 notebook







                share|improve this answer





















                • 2





                  You shouldn't ever have to use sudo with pip (or pip3)

                  – s g
                  Aug 10 '17 at 22:24






                • 2





                  Why [all] on the end? pip3 install ipython worked for me.

                  – Stu Cox
                  Jan 27 '18 at 8:06
















                94














                To set IPython Notebook to run Python 3 instead of 2 on my MAC 10.9, I did the following steps



                $ sudo pip3 install ipython[all]


                Then



                $ ipython3 notebook







                share|improve this answer





















                • 2





                  You shouldn't ever have to use sudo with pip (or pip3)

                  – s g
                  Aug 10 '17 at 22:24






                • 2





                  Why [all] on the end? pip3 install ipython worked for me.

                  – Stu Cox
                  Jan 27 '18 at 8:06














                94












                94








                94







                To set IPython Notebook to run Python 3 instead of 2 on my MAC 10.9, I did the following steps



                $ sudo pip3 install ipython[all]


                Then



                $ ipython3 notebook







                share|improve this answer















                To set IPython Notebook to run Python 3 instead of 2 on my MAC 10.9, I did the following steps



                $ sudo pip3 install ipython[all]


                Then



                $ ipython3 notebook








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 4 '17 at 8:09









                wjandrea

                1,0911328




                1,0911328










                answered Mar 4 '15 at 22:36









                Noha ElprinceNoha Elprince

                1,45398




                1,45398








                • 2





                  You shouldn't ever have to use sudo with pip (or pip3)

                  – s g
                  Aug 10 '17 at 22:24






                • 2





                  Why [all] on the end? pip3 install ipython worked for me.

                  – Stu Cox
                  Jan 27 '18 at 8:06














                • 2





                  You shouldn't ever have to use sudo with pip (or pip3)

                  – s g
                  Aug 10 '17 at 22:24






                • 2





                  Why [all] on the end? pip3 install ipython worked for me.

                  – Stu Cox
                  Jan 27 '18 at 8:06








                2




                2





                You shouldn't ever have to use sudo with pip (or pip3)

                – s g
                Aug 10 '17 at 22:24





                You shouldn't ever have to use sudo with pip (or pip3)

                – s g
                Aug 10 '17 at 22:24




                2




                2





                Why [all] on the end? pip3 install ipython worked for me.

                – Stu Cox
                Jan 27 '18 at 8:06





                Why [all] on the end? pip3 install ipython worked for me.

                – Stu Cox
                Jan 27 '18 at 8:06













                8














                For linux 16.04 Ubuntu you can use



                sudo apt-get install ipython3


                and then use



                ipython3 notebook


                to open the notebook in the browser. If you have any notebooks saved with python 2 then it will automatically convert them to Python 3 once you open the notebook.






                share|improve this answer




























                  8














                  For linux 16.04 Ubuntu you can use



                  sudo apt-get install ipython3


                  and then use



                  ipython3 notebook


                  to open the notebook in the browser. If you have any notebooks saved with python 2 then it will automatically convert them to Python 3 once you open the notebook.






                  share|improve this answer


























                    8












                    8








                    8







                    For linux 16.04 Ubuntu you can use



                    sudo apt-get install ipython3


                    and then use



                    ipython3 notebook


                    to open the notebook in the browser. If you have any notebooks saved with python 2 then it will automatically convert them to Python 3 once you open the notebook.






                    share|improve this answer













                    For linux 16.04 Ubuntu you can use



                    sudo apt-get install ipython3


                    and then use



                    ipython3 notebook


                    to open the notebook in the browser. If you have any notebooks saved with python 2 then it will automatically convert them to Python 3 once you open the notebook.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 26 '16 at 16:23









                    PanosPanos

                    5061115




                    5061115























                        4














                        Is there a package from your distro? If you're using ubuntu you must to install the ipython3-notebook package.
                        If not, maybe you must to install ipython with python3.



                        If you've run (because it's python2 by default)



                        python setup.py


                        you must to run instead



                        python3 setup.py install


                        to install a package with python3 instead python2.
                        This will be a new instalation of ipython3.






                        share|improve this answer






























                          4














                          Is there a package from your distro? If you're using ubuntu you must to install the ipython3-notebook package.
                          If not, maybe you must to install ipython with python3.



                          If you've run (because it's python2 by default)



                          python setup.py


                          you must to run instead



                          python3 setup.py install


                          to install a package with python3 instead python2.
                          This will be a new instalation of ipython3.






                          share|improve this answer




























                            4












                            4








                            4







                            Is there a package from your distro? If you're using ubuntu you must to install the ipython3-notebook package.
                            If not, maybe you must to install ipython with python3.



                            If you've run (because it's python2 by default)



                            python setup.py


                            you must to run instead



                            python3 setup.py install


                            to install a package with python3 instead python2.
                            This will be a new instalation of ipython3.






                            share|improve this answer















                            Is there a package from your distro? If you're using ubuntu you must to install the ipython3-notebook package.
                            If not, maybe you must to install ipython with python3.



                            If you've run (because it's python2 by default)



                            python setup.py


                            you must to run instead



                            python3 setup.py install


                            to install a package with python3 instead python2.
                            This will be a new instalation of ipython3.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Sep 22 '16 at 17:01

























                            answered Jan 15 '14 at 23:24









                            OrlandoOrlando

                            90221125




                            90221125























                                1














                                In Anaconda "launcher.app" there is “Environment:” pull down menu.
                                The default environment is called "root". In order to launch application using another environment, just select the desired environment from the list, to make it active.






                                share|improve this answer




























                                  1














                                  In Anaconda "launcher.app" there is “Environment:” pull down menu.
                                  The default environment is called "root". In order to launch application using another environment, just select the desired environment from the list, to make it active.






                                  share|improve this answer


























                                    1












                                    1








                                    1







                                    In Anaconda "launcher.app" there is “Environment:” pull down menu.
                                    The default environment is called "root". In order to launch application using another environment, just select the desired environment from the list, to make it active.






                                    share|improve this answer













                                    In Anaconda "launcher.app" there is “Environment:” pull down menu.
                                    The default environment is called "root". In order to launch application using another environment, just select the desired environment from the list, to make it active.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Oct 27 '14 at 10:31









                                    Andrzej NeugebauerAndrzej Neugebauer

                                    133




                                    133























                                        1














                                        If you are running anaconda, then the preferred way to install notebook/jupyter is using conda:



                                        conda install jupyter





                                        share|improve this answer




























                                          1














                                          If you are running anaconda, then the preferred way to install notebook/jupyter is using conda:



                                          conda install jupyter





                                          share|improve this answer


























                                            1












                                            1








                                            1







                                            If you are running anaconda, then the preferred way to install notebook/jupyter is using conda:



                                            conda install jupyter





                                            share|improve this answer













                                            If you are running anaconda, then the preferred way to install notebook/jupyter is using conda:



                                            conda install jupyter






                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Nov 25 '15 at 14:10









                                            PaulPaul

                                            4,00062533




                                            4,00062533























                                                1














                                                To use jupyter with python 3 instead of python 2 on my Windows 10 with Anaconda, I did the following steps on anaconda prompt:



                                                pip3 install ipython[all]


                                                Then,



                                                ipython3 notebook





                                                share|improve this answer






























                                                  1














                                                  To use jupyter with python 3 instead of python 2 on my Windows 10 with Anaconda, I did the following steps on anaconda prompt:



                                                  pip3 install ipython[all]


                                                  Then,



                                                  ipython3 notebook





                                                  share|improve this answer




























                                                    1












                                                    1








                                                    1







                                                    To use jupyter with python 3 instead of python 2 on my Windows 10 with Anaconda, I did the following steps on anaconda prompt:



                                                    pip3 install ipython[all]


                                                    Then,



                                                    ipython3 notebook





                                                    share|improve this answer















                                                    To use jupyter with python 3 instead of python 2 on my Windows 10 with Anaconda, I did the following steps on anaconda prompt:



                                                    pip3 install ipython[all]


                                                    Then,



                                                    ipython3 notebook






                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited Dec 19 '17 at 22:31









                                                    Bless

                                                    2,25222031




                                                    2,25222031










                                                    answered Dec 19 '17 at 21:48









                                                    Moitreyee DasguptaMoitreyee Dasgupta

                                                    211




                                                    211























                                                        0














                                                        If you have both version available on jupyter notebook, you can change the kernel from menu.






                                                        share|improve this answer




























                                                          0














                                                          If you have both version available on jupyter notebook, you can change the kernel from menu.






                                                          share|improve this answer


























                                                            0












                                                            0








                                                            0







                                                            If you have both version available on jupyter notebook, you can change the kernel from menu.






                                                            share|improve this answer













                                                            If you have both version available on jupyter notebook, you can change the kernel from menu.







                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Mar 18 '16 at 14:19









                                                            Arun Kumar KhattriArun Kumar Khattri

                                                            486412




                                                            486412























                                                                0














                                                                Another solution would be to create a virtualenv with python3:



                                                                From this environment, install tensorflow (the version you prefer) there:



                                                                pip install tensorflow


                                                                Run your jupyter from there !






                                                                share|improve this answer




























                                                                  0














                                                                  Another solution would be to create a virtualenv with python3:



                                                                  From this environment, install tensorflow (the version you prefer) there:



                                                                  pip install tensorflow


                                                                  Run your jupyter from there !






                                                                  share|improve this answer


























                                                                    0












                                                                    0








                                                                    0







                                                                    Another solution would be to create a virtualenv with python3:



                                                                    From this environment, install tensorflow (the version you prefer) there:



                                                                    pip install tensorflow


                                                                    Run your jupyter from there !






                                                                    share|improve this answer













                                                                    Another solution would be to create a virtualenv with python3:



                                                                    From this environment, install tensorflow (the version you prefer) there:



                                                                    pip install tensorflow


                                                                    Run your jupyter from there !







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Nov 20 '18 at 14:34









                                                                    Magaly AlonzoMagaly Alonzo

                                                                    214




                                                                    214






























                                                                        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%2f20360293%2fhow-to-get-ipython-notebook-to-run-python-3%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 change which sound is reproduced for terminal bell?

                                                                        Can I use Tabulator js library in my java Spring + Thymeleaf project?

                                                                        Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents