matplotlib.pyplot is not working!












-3















I'm using Jupyter Notebook, and matplotlib.pyplot is not working. I'm using Python 2.7 in Ubuntu 14.04.



Image of the error message










share|improve this question





























    -3















    I'm using Jupyter Notebook, and matplotlib.pyplot is not working. I'm using Python 2.7 in Ubuntu 14.04.



    Image of the error message










    share|improve this question



























      -3












      -3








      -3








      I'm using Jupyter Notebook, and matplotlib.pyplot is not working. I'm using Python 2.7 in Ubuntu 14.04.



      Image of the error message










      share|improve this question
















      I'm using Jupyter Notebook, and matplotlib.pyplot is not working. I'm using Python 2.7 in Ubuntu 14.04.



      Image of the error message







      14.04 anaconda ipython jupyter matplotlib






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 9 '18 at 8:57









      karel

      57.8k12128146




      57.8k12128146










      asked Nov 23 '17 at 17:34









      Pradheep KrishnaPradheep Krishna

      12




      12






















          1 Answer
          1






          active

          oldest

          votes


















          4














          Your code got the following error message:



          ImportError: numpy.core.multiarray failed to import


          Change your Python code like this and then test it first in the terminal:



          :~$ python
          >>> import numpy
          >>> from numpy import core
          >>> from numpy.core import multiarray as ma


          If you also have python-matplotlib installed, the first line of code to enable plotting in the current Jupyter Notebook is %matplotlib inline



          Your Jupyter Notebook also shows another error message:



          RuntimeError: module compile against API version 0xa but this version of numpy is 0x9


          numpy from Anaconda is not compatible with ipython or some other package that you have installed. This would not happen if you installed the python-numpy, ipython, and python-matplotlib packages from the default Ubuntu repositories. I have installed Jupyter Notebook in Ubuntu 14.04 with the command sudo apt-get -y install ipython ipython-notebook && sudo -H pip install jupyter and in Ubuntu 18.04 from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter-core python-ipykernel and used it with ipython, python-matplotlib and python-numpy also from the default Ubuntu repositories without any problems.






          share|improve this answer


























          • Thanks ! But it did not work

            – Pradheep Krishna
            Nov 23 '17 at 19:08











          • The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

            – karel
            Nov 23 '17 at 19:19











          • @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

            – mook765
            Nov 23 '17 at 19:36











          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%2f979574%2fmatplotlib-pyplot-is-not-working%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          Your code got the following error message:



          ImportError: numpy.core.multiarray failed to import


          Change your Python code like this and then test it first in the terminal:



          :~$ python
          >>> import numpy
          >>> from numpy import core
          >>> from numpy.core import multiarray as ma


          If you also have python-matplotlib installed, the first line of code to enable plotting in the current Jupyter Notebook is %matplotlib inline



          Your Jupyter Notebook also shows another error message:



          RuntimeError: module compile against API version 0xa but this version of numpy is 0x9


          numpy from Anaconda is not compatible with ipython or some other package that you have installed. This would not happen if you installed the python-numpy, ipython, and python-matplotlib packages from the default Ubuntu repositories. I have installed Jupyter Notebook in Ubuntu 14.04 with the command sudo apt-get -y install ipython ipython-notebook && sudo -H pip install jupyter and in Ubuntu 18.04 from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter-core python-ipykernel and used it with ipython, python-matplotlib and python-numpy also from the default Ubuntu repositories without any problems.






          share|improve this answer


























          • Thanks ! But it did not work

            – Pradheep Krishna
            Nov 23 '17 at 19:08











          • The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

            – karel
            Nov 23 '17 at 19:19











          • @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

            – mook765
            Nov 23 '17 at 19:36
















          4














          Your code got the following error message:



          ImportError: numpy.core.multiarray failed to import


          Change your Python code like this and then test it first in the terminal:



          :~$ python
          >>> import numpy
          >>> from numpy import core
          >>> from numpy.core import multiarray as ma


          If you also have python-matplotlib installed, the first line of code to enable plotting in the current Jupyter Notebook is %matplotlib inline



          Your Jupyter Notebook also shows another error message:



          RuntimeError: module compile against API version 0xa but this version of numpy is 0x9


          numpy from Anaconda is not compatible with ipython or some other package that you have installed. This would not happen if you installed the python-numpy, ipython, and python-matplotlib packages from the default Ubuntu repositories. I have installed Jupyter Notebook in Ubuntu 14.04 with the command sudo apt-get -y install ipython ipython-notebook && sudo -H pip install jupyter and in Ubuntu 18.04 from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter-core python-ipykernel and used it with ipython, python-matplotlib and python-numpy also from the default Ubuntu repositories without any problems.






          share|improve this answer


























          • Thanks ! But it did not work

            – Pradheep Krishna
            Nov 23 '17 at 19:08











          • The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

            – karel
            Nov 23 '17 at 19:19











          • @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

            – mook765
            Nov 23 '17 at 19:36














          4












          4








          4







          Your code got the following error message:



          ImportError: numpy.core.multiarray failed to import


          Change your Python code like this and then test it first in the terminal:



          :~$ python
          >>> import numpy
          >>> from numpy import core
          >>> from numpy.core import multiarray as ma


          If you also have python-matplotlib installed, the first line of code to enable plotting in the current Jupyter Notebook is %matplotlib inline



          Your Jupyter Notebook also shows another error message:



          RuntimeError: module compile against API version 0xa but this version of numpy is 0x9


          numpy from Anaconda is not compatible with ipython or some other package that you have installed. This would not happen if you installed the python-numpy, ipython, and python-matplotlib packages from the default Ubuntu repositories. I have installed Jupyter Notebook in Ubuntu 14.04 with the command sudo apt-get -y install ipython ipython-notebook && sudo -H pip install jupyter and in Ubuntu 18.04 from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter-core python-ipykernel and used it with ipython, python-matplotlib and python-numpy also from the default Ubuntu repositories without any problems.






          share|improve this answer















          Your code got the following error message:



          ImportError: numpy.core.multiarray failed to import


          Change your Python code like this and then test it first in the terminal:



          :~$ python
          >>> import numpy
          >>> from numpy import core
          >>> from numpy.core import multiarray as ma


          If you also have python-matplotlib installed, the first line of code to enable plotting in the current Jupyter Notebook is %matplotlib inline



          Your Jupyter Notebook also shows another error message:



          RuntimeError: module compile against API version 0xa but this version of numpy is 0x9


          numpy from Anaconda is not compatible with ipython or some other package that you have installed. This would not happen if you installed the python-numpy, ipython, and python-matplotlib packages from the default Ubuntu repositories. I have installed Jupyter Notebook in Ubuntu 14.04 with the command sudo apt-get -y install ipython ipython-notebook && sudo -H pip install jupyter and in Ubuntu 18.04 from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter-core python-ipykernel and used it with ipython, python-matplotlib and python-numpy also from the default Ubuntu repositories without any problems.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 22 '18 at 8:53

























          answered Nov 23 '17 at 17:47









          karelkarel

          57.8k12128146




          57.8k12128146













          • Thanks ! But it did not work

            – Pradheep Krishna
            Nov 23 '17 at 19:08











          • The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

            – karel
            Nov 23 '17 at 19:19











          • @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

            – mook765
            Nov 23 '17 at 19:36



















          • Thanks ! But it did not work

            – Pradheep Krishna
            Nov 23 '17 at 19:08











          • The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

            – karel
            Nov 23 '17 at 19:19











          • @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

            – mook765
            Nov 23 '17 at 19:36

















          Thanks ! But it did not work

          – Pradheep Krishna
          Nov 23 '17 at 19:08





          Thanks ! But it did not work

          – Pradheep Krishna
          Nov 23 '17 at 19:08













          The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

          – karel
          Nov 23 '17 at 19:19





          The reason why I wrote my code in 3 steps is so you could test if numpy works. The same code works in my computer, so you probably have something wrong in your Ananconda installation.

          – karel
          Nov 23 '17 at 19:19













          @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

          – mook765
          Nov 23 '17 at 19:36





          @karel I think the first line in the error messages is the clue here, RuntimeErrror module compiled against API version 0xa but this version of numpy is 0x9.

          – mook765
          Nov 23 '17 at 19:36


















          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%2f979574%2fmatplotlib-pyplot-is-not-working%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