Matplotlib doesn't display graph in virtualenv

后端 未结 5 885
予麋鹿
予麋鹿 2021-02-05 11:53

I have pip installed matplotlib in my virtualenv and I am trying to plot a simple graph. I use Eclipse and PyDev. When I run the script from Eclipse it doesn\'t display any grap

5条回答
  •  广开言路
    2021-02-05 12:41

    Your code works inside my virtualenv on OSX 10.7 with Python 2.7:

    enter image description here

    What version of Python are you using inside your virtualenv? My guess is that either you have not installed a matplotlib dependency or your installation of an installed dependency was not properly performed. On Python 2.7 here is what I did to install matplotlib. Can you try these steps in a new virtualenv and see if it works for you?

    pip install numpy
    pip install scipy
    easy_install matplotlib
    

提交回复
热议问题