Not able to plot graph: matplotlib is needed for plotting

后端 未结 4 1595
自闭症患者
自闭症患者 2021-01-18 13:01

I am able to generate *.dat file:

vikas@server:~/memory_profiler-0.36$ ./mprof run --python test_sl.py 
vikas@server:~/memory_profiler-0.36$ ls *.dat
mprofil         


        
4条回答
  •  我在风中等你
    2021-01-18 13:46

    I had the same problem. I used memory_profiler lib typing this commands (mprof run runner.py and mprof plot) and got a message "matplotlib is needed for plotting"

    I tried to get rid of this problem following advice I found here but in the result I solved this problem completing these simple steps:

    1. delete files in /usr/lib64/python2.7/site-packages/ connected with matplotlib (or you can uninstall matplotlib using the ordinary way)

    2. use sudo yum-builddep python-matplotlib to install connected packages (222 packages were installed, if you need apt-get, you need this command: sudo apt-get build-dep python-matplotlib)

    3. install matplotlib sudo yum reinstall python-matplotlib (or use install command, with apt-get: sudo apt-get install python-matplotlib)

    I believe this will help.

提交回复
热议问题