python, anaconda, Spyder — uninstalling python package using pip DOES NOT work in Spyder + ipython












0















By using pip, I can successfully install new packages in ipython running in the Spyder environment. All I need to run is this:



!python -m pip install mypackage


However, trying to uninstall packages doesn't seem to work, at all. When I run:



!python -m pip uninstall mypackage


The console goes into a state of hanging. It's not strictly 'hanging' because neither Spyder nor the console hangs but the command just isn't returning anything



I am attaching a screenshot to help explain what I mean. The screenshot shows what happens AFTER I have pressed ENTER on this line - and nothing happens!



Does anything know why?



pip uninstall.jpg










share|improve this question





























    0















    By using pip, I can successfully install new packages in ipython running in the Spyder environment. All I need to run is this:



    !python -m pip install mypackage


    However, trying to uninstall packages doesn't seem to work, at all. When I run:



    !python -m pip uninstall mypackage


    The console goes into a state of hanging. It's not strictly 'hanging' because neither Spyder nor the console hangs but the command just isn't returning anything



    I am attaching a screenshot to help explain what I mean. The screenshot shows what happens AFTER I have pressed ENTER on this line - and nothing happens!



    Does anything know why?



    pip uninstall.jpg










    share|improve this question



























      0












      0








      0








      By using pip, I can successfully install new packages in ipython running in the Spyder environment. All I need to run is this:



      !python -m pip install mypackage


      However, trying to uninstall packages doesn't seem to work, at all. When I run:



      !python -m pip uninstall mypackage


      The console goes into a state of hanging. It's not strictly 'hanging' because neither Spyder nor the console hangs but the command just isn't returning anything



      I am attaching a screenshot to help explain what I mean. The screenshot shows what happens AFTER I have pressed ENTER on this line - and nothing happens!



      Does anything know why?



      pip uninstall.jpg










      share|improve this question
















      By using pip, I can successfully install new packages in ipython running in the Spyder environment. All I need to run is this:



      !python -m pip install mypackage


      However, trying to uninstall packages doesn't seem to work, at all. When I run:



      !python -m pip uninstall mypackage


      The console goes into a state of hanging. It's not strictly 'hanging' because neither Spyder nor the console hangs but the command just isn't returning anything



      I am attaching a screenshot to help explain what I mean. The screenshot shows what happens AFTER I have pressed ENTER on this line - and nothing happens!



      Does anything know why?



      pip uninstall.jpg







      python pip anaconda ipython spyder






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 '18 at 22:51









      phd

      23.8k52546




      23.8k52546










      asked Nov 25 '18 at 21:27









      ZXYZXY

      212




      212
























          2 Answers
          2






          active

          oldest

          votes


















          1














          You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.






          share|improve this answer































            0














            (Spyder maintainer here) Both pip and conda are not meant to be run inside one of our IPython consoles because they expect to be running in a real system terminal (xterm, Terminal.app or cmd.exe).



            In this case, pip expects input from the user (the confirmation that he/she really wants to uninstall a package). That confirmation can't be displayed in our consoles and it makes it looked like its blocked.



            What you could do is to pass the -q option to pip to avoid confirmation. But in general it's a very bad idea to use pip and conda inside our consoles for the reasons I stated above.






            share|improve this answer
























            • Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

              – ZXY
              Nov 30 '18 at 11:24













            • As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

              – Carlos Cordoba
              Nov 30 '18 at 13:42













            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%2f53472168%2fpython-anaconda-spyder-uninstalling-python-package-using-pip-does-not-work%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














            You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.






            share|improve this answer




























              1














              You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.






              share|improve this answer


























                1












                1








                1







                You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.






                share|improve this answer













                You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 26 '18 at 0:33









                jmhjmh

                1,3742919




                1,3742919

























                    0














                    (Spyder maintainer here) Both pip and conda are not meant to be run inside one of our IPython consoles because they expect to be running in a real system terminal (xterm, Terminal.app or cmd.exe).



                    In this case, pip expects input from the user (the confirmation that he/she really wants to uninstall a package). That confirmation can't be displayed in our consoles and it makes it looked like its blocked.



                    What you could do is to pass the -q option to pip to avoid confirmation. But in general it's a very bad idea to use pip and conda inside our consoles for the reasons I stated above.






                    share|improve this answer
























                    • Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

                      – ZXY
                      Nov 30 '18 at 11:24













                    • As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

                      – Carlos Cordoba
                      Nov 30 '18 at 13:42


















                    0














                    (Spyder maintainer here) Both pip and conda are not meant to be run inside one of our IPython consoles because they expect to be running in a real system terminal (xterm, Terminal.app or cmd.exe).



                    In this case, pip expects input from the user (the confirmation that he/she really wants to uninstall a package). That confirmation can't be displayed in our consoles and it makes it looked like its blocked.



                    What you could do is to pass the -q option to pip to avoid confirmation. But in general it's a very bad idea to use pip and conda inside our consoles for the reasons I stated above.






                    share|improve this answer
























                    • Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

                      – ZXY
                      Nov 30 '18 at 11:24













                    • As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

                      – Carlos Cordoba
                      Nov 30 '18 at 13:42
















                    0












                    0








                    0







                    (Spyder maintainer here) Both pip and conda are not meant to be run inside one of our IPython consoles because they expect to be running in a real system terminal (xterm, Terminal.app or cmd.exe).



                    In this case, pip expects input from the user (the confirmation that he/she really wants to uninstall a package). That confirmation can't be displayed in our consoles and it makes it looked like its blocked.



                    What you could do is to pass the -q option to pip to avoid confirmation. But in general it's a very bad idea to use pip and conda inside our consoles for the reasons I stated above.






                    share|improve this answer













                    (Spyder maintainer here) Both pip and conda are not meant to be run inside one of our IPython consoles because they expect to be running in a real system terminal (xterm, Terminal.app or cmd.exe).



                    In this case, pip expects input from the user (the confirmation that he/she really wants to uninstall a package). That confirmation can't be displayed in our consoles and it makes it looked like its blocked.



                    What you could do is to pass the -q option to pip to avoid confirmation. But in general it's a very bad idea to use pip and conda inside our consoles for the reasons I stated above.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 29 '18 at 21:09









                    Carlos CordobaCarlos Cordoba

                    14.7k54371




                    14.7k54371













                    • Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

                      – ZXY
                      Nov 30 '18 at 11:24













                    • As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

                      – Carlos Cordoba
                      Nov 30 '18 at 13:42





















                    • Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

                      – ZXY
                      Nov 30 '18 at 11:24













                    • As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

                      – Carlos Cordoba
                      Nov 30 '18 at 13:42



















                    Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

                    – ZXY
                    Nov 30 '18 at 11:24







                    Hi, Carlos, many thanks for your reply. It's good to get some insights from Spyder. Unfortunately your suggestion of using -q still doesnt' work. My new command is: "!python -m pip -q uninstall tensorflow". And it still hangs. I did try to use the native command line but 'pip' was not even recognized when I ran it on cmd. Must be environment variable issues but I don't know how to resolve it. Anyhow, the easist solution for me would still be to run pip on iPython (I know you advise against it) but -q doesn't help.

                    – ZXY
                    Nov 30 '18 at 11:24















                    As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

                    – Carlos Cordoba
                    Nov 30 '18 at 13:42







                    As I said, please stop using pip from our consoles and try to use it from the terminal. If it's not detected by default, you probably need to activate the conda or venv where you installed it first.

                    – Carlos Cordoba
                    Nov 30 '18 at 13:42




















                    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%2f53472168%2fpython-anaconda-spyder-uninstalling-python-package-using-pip-does-not-work%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

                    Wiesbaden

                    Marschland

                    Dieringhausen