![我在安装 Python 3.8.5 时遇到一些问题,每当我尝试导入包时,它都会显示一条错误:没有名为“.....”的模块](https://linux22.com/image/1070723/%E6%88%91%E5%9C%A8%E5%AE%89%E8%A3%85%20Python%203.8.5%20%E6%97%B6%E9%81%87%E5%88%B0%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98%EF%BC%8C%E6%AF%8F%E5%BD%93%E6%88%91%E5%B0%9D%E8%AF%95%E5%AF%BC%E5%85%A5%E5%8C%85%E6%97%B6%EF%BC%8C%E5%AE%83%E9%83%BD%E4%BC%9A%E6%98%BE%E7%A4%BA%E4%B8%80%E6%9D%A1%E9%94%99%E8%AF%AF%EF%BC%9A%E6%B2%A1%E6%9C%89%E5%90%8D%E4%B8%BA%E2%80%9C.....%E2%80%9D%E7%9A%84%E6%A8%A1%E5%9D%97.png)
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<console>", line 1, in <module>
ModuleNotFoundError: No module named 'matplotlib'
答案1
安装matplotlib
对于系统 python,请使用以下命令:
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python3-matplotlib