Installing matplotlib on Ubuntu 14.04 after installing Python 3 with pyenv












11














I am using Ubuntu 14.04 with Python 2.7.6. I have installed matplotlib for Python 2. Now, I just installed Python 3.4.2 using pyenv install 3.4.2. I then ran pip install matplotlib to install matplotlib for Python 3. I later discovered the package python3-matplotlib for Ubuntu 14.04. I wonder: should I have used sudo apt-get install python3-matplotlib instead? What is the preferred way of installing matplotlib for Python 3 side-by- side with the Python 2 matplotlib?










share|improve this question





























    11














    I am using Ubuntu 14.04 with Python 2.7.6. I have installed matplotlib for Python 2. Now, I just installed Python 3.4.2 using pyenv install 3.4.2. I then ran pip install matplotlib to install matplotlib for Python 3. I later discovered the package python3-matplotlib for Ubuntu 14.04. I wonder: should I have used sudo apt-get install python3-matplotlib instead? What is the preferred way of installing matplotlib for Python 3 side-by- side with the Python 2 matplotlib?










    share|improve this question



























      11












      11








      11


      2





      I am using Ubuntu 14.04 with Python 2.7.6. I have installed matplotlib for Python 2. Now, I just installed Python 3.4.2 using pyenv install 3.4.2. I then ran pip install matplotlib to install matplotlib for Python 3. I later discovered the package python3-matplotlib for Ubuntu 14.04. I wonder: should I have used sudo apt-get install python3-matplotlib instead? What is the preferred way of installing matplotlib for Python 3 side-by- side with the Python 2 matplotlib?










      share|improve this question















      I am using Ubuntu 14.04 with Python 2.7.6. I have installed matplotlib for Python 2. Now, I just installed Python 3.4.2 using pyenv install 3.4.2. I then ran pip install matplotlib to install matplotlib for Python 3. I later discovered the package python3-matplotlib for Ubuntu 14.04. I wonder: should I have used sudo apt-get install python3-matplotlib instead? What is the preferred way of installing matplotlib for Python 3 side-by- side with the Python 2 matplotlib?







      14.04 apt python






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 15 '14 at 6:03

























      asked Oct 15 '14 at 5:44









      Håkon Hægland

      1,38141846




      1,38141846






















          2 Answers
          2






          active

          oldest

          votes


















          22














          I dont have Ubuntu system right now with me. but still I can help you I think.



          open your terminal and type as



          apt-cache search python3-matplotlib


          If you find it like its available then you can install it from



          sudo apt-get install python3-matplotlib


          that is the most preferred way.



          Now how to use matplotlib with python 3. I have posted a question also in here about how to use python2 and python3 side by side.



          Simple , use python3 <filename.py> while executing your program with python3-matplotlib



          and similarly if you use python2 then it will load python 2.



          hope that helps.






          share|improve this answer





















          • Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
            – Håkon Hægland
            Oct 15 '14 at 6:11










          • No need, you can continue.
            – rɑːdʒɑ
            Oct 15 '14 at 6:14










          • Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
            – Håkon Hægland
            Oct 15 '14 at 6:14










          • 1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
            – rɑːdʒɑ
            Oct 15 '14 at 6:16






          • 1




            Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
            – Håkon Hægland
            Oct 15 '14 at 6:20



















          -1














          It is a problem with the development files of libgeos. I have the same problem and it was resolved by installing those libraries. Hope it helps.






          share|improve this answer





















          • Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
            – gravitymixes
            Jun 28 '16 at 13:46











          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%2f537264%2finstalling-matplotlib-on-ubuntu-14-04-after-installing-python-3-with-pyenv%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









          22














          I dont have Ubuntu system right now with me. but still I can help you I think.



          open your terminal and type as



          apt-cache search python3-matplotlib


          If you find it like its available then you can install it from



          sudo apt-get install python3-matplotlib


          that is the most preferred way.



          Now how to use matplotlib with python 3. I have posted a question also in here about how to use python2 and python3 side by side.



          Simple , use python3 <filename.py> while executing your program with python3-matplotlib



          and similarly if you use python2 then it will load python 2.



          hope that helps.






          share|improve this answer





















          • Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
            – Håkon Hægland
            Oct 15 '14 at 6:11










          • No need, you can continue.
            – rɑːdʒɑ
            Oct 15 '14 at 6:14










          • Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
            – Håkon Hægland
            Oct 15 '14 at 6:14










          • 1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
            – rɑːdʒɑ
            Oct 15 '14 at 6:16






          • 1




            Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
            – Håkon Hægland
            Oct 15 '14 at 6:20
















          22














          I dont have Ubuntu system right now with me. but still I can help you I think.



          open your terminal and type as



          apt-cache search python3-matplotlib


          If you find it like its available then you can install it from



          sudo apt-get install python3-matplotlib


          that is the most preferred way.



          Now how to use matplotlib with python 3. I have posted a question also in here about how to use python2 and python3 side by side.



          Simple , use python3 <filename.py> while executing your program with python3-matplotlib



          and similarly if you use python2 then it will load python 2.



          hope that helps.






          share|improve this answer





















          • Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
            – Håkon Hægland
            Oct 15 '14 at 6:11










          • No need, you can continue.
            – rɑːdʒɑ
            Oct 15 '14 at 6:14










          • Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
            – Håkon Hægland
            Oct 15 '14 at 6:14










          • 1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
            – rɑːdʒɑ
            Oct 15 '14 at 6:16






          • 1




            Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
            – Håkon Hægland
            Oct 15 '14 at 6:20














          22












          22








          22






          I dont have Ubuntu system right now with me. but still I can help you I think.



          open your terminal and type as



          apt-cache search python3-matplotlib


          If you find it like its available then you can install it from



          sudo apt-get install python3-matplotlib


          that is the most preferred way.



          Now how to use matplotlib with python 3. I have posted a question also in here about how to use python2 and python3 side by side.



          Simple , use python3 <filename.py> while executing your program with python3-matplotlib



          and similarly if you use python2 then it will load python 2.



          hope that helps.






          share|improve this answer












          I dont have Ubuntu system right now with me. but still I can help you I think.



          open your terminal and type as



          apt-cache search python3-matplotlib


          If you find it like its available then you can install it from



          sudo apt-get install python3-matplotlib


          that is the most preferred way.



          Now how to use matplotlib with python 3. I have posted a question also in here about how to use python2 and python3 side by side.



          Simple , use python3 <filename.py> while executing your program with python3-matplotlib



          and similarly if you use python2 then it will load python 2.



          hope that helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 15 '14 at 6:06









          rɑːdʒɑ

          57k84216301




          57k84216301












          • Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
            – Håkon Hægland
            Oct 15 '14 at 6:11










          • No need, you can continue.
            – rɑːdʒɑ
            Oct 15 '14 at 6:14










          • Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
            – Håkon Hægland
            Oct 15 '14 at 6:14










          • 1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
            – rɑːdʒɑ
            Oct 15 '14 at 6:16






          • 1




            Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
            – Håkon Hægland
            Oct 15 '14 at 6:20


















          • Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
            – Håkon Hægland
            Oct 15 '14 at 6:11










          • No need, you can continue.
            – rɑːdʒɑ
            Oct 15 '14 at 6:14










          • Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
            – Håkon Hægland
            Oct 15 '14 at 6:14










          • 1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
            – rɑːdʒɑ
            Oct 15 '14 at 6:16






          • 1




            Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
            – Håkon Hægland
            Oct 15 '14 at 6:20
















          Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
          – Håkon Hægland
          Oct 15 '14 at 6:11




          Thanks, the package is available. Should I try uninstall the pip installation, that is: pip uninstall matplotlib, and then run sudo apt-get install python3-matplotlib?
          – Håkon Hægland
          Oct 15 '14 at 6:11












          No need, you can continue.
          – rɑːdʒɑ
          Oct 15 '14 at 6:14




          No need, you can continue.
          – rɑːdʒɑ
          Oct 15 '14 at 6:14












          Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
          – Håkon Hægland
          Oct 15 '14 at 6:14




          Regarding how to run it: Or I could run pyenv global 3.4.2 and then just python <filename.py>?
          – Håkon Hægland
          Oct 15 '14 at 6:14












          1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
          – rɑːdʒɑ
          Oct 15 '14 at 6:16




          1st one is okay but 2nd one you have to use python3 <filename.py> so it load python3 modules
          – rɑːdʒɑ
          Oct 15 '14 at 6:16




          1




          1




          Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
          – Håkon Hægland
          Oct 15 '14 at 6:20




          Ok, I now installed python3-matplotlib using apt-get. I ran a test plot, and it still works (for both python 2.7.6 and 3.4.2)..
          – Håkon Hægland
          Oct 15 '14 at 6:20













          -1














          It is a problem with the development files of libgeos. I have the same problem and it was resolved by installing those libraries. Hope it helps.






          share|improve this answer





















          • Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
            – gravitymixes
            Jun 28 '16 at 13:46
















          -1














          It is a problem with the development files of libgeos. I have the same problem and it was resolved by installing those libraries. Hope it helps.






          share|improve this answer





















          • Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
            – gravitymixes
            Jun 28 '16 at 13:46














          -1












          -1








          -1






          It is a problem with the development files of libgeos. I have the same problem and it was resolved by installing those libraries. Hope it helps.






          share|improve this answer












          It is a problem with the development files of libgeos. I have the same problem and it was resolved by installing those libraries. Hope it helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 28 '16 at 12:54









          Emiliano

          1




          1












          • Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
            – gravitymixes
            Jun 28 '16 at 13:46


















          • Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
            – gravitymixes
            Jun 28 '16 at 13:46
















          Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
          – gravitymixes
          Jun 28 '16 at 13:46




          Additional information, such as what commands to run in Terminal, or through the GUI, would be very useful for the OP to understand what needs to be done.
          – gravitymixes
          Jun 28 '16 at 13:46


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f537264%2finstalling-matplotlib-on-ubuntu-14-04-after-installing-python-3-with-pyenv%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

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕