ImportError: No module named matplotlib.pyplot

后端 未结 13 774
春和景丽
春和景丽 2020-11-28 02:03

I am currently practicing matplotlib. This is the first example I practice.

#!/usr/bin/python

import matplotlib.pyplot as plt

radius = [1.0, 2.0, 3.0, 4.0]         


        
相关标签:
13条回答
  • 2020-11-28 03:05

    The file permissions on my virtual environment directory and my project directory were not correct and, thus, would not allow me to install the proper packages. I upadated them by running:

    sudo chown user:user -R [project folder]
    sudo chown user:user -R [environment folder]
    

    In the above your should use your own usernames in place of "user". The -R recurses through all subfolders and files.

    0 讨论(0)
提交回复
热议问题