Python Geany IDE:“;没有名为matplotlib的模块;

Python Geany IDE:“;没有名为matplotlib的模块;,python,matplotlib,plot,Python,Matplotlib,Plot,我将anaconda下载到我的Linux ubuntu系统上,并试图从文本文件中绘制数据点。当我点击execute时,终端告诉我没有识别的matplotlib,即使它包含在anaconda中 我已确保matplotlib已安装并且是最新的。我的系统告诉我它已安装,但Geany(我的IDE)不会识别它已安装 import matplotlib.pyplot as plt import csv x = [] y = [] with open('data.v3.txt') as datafile:

我将anaconda下载到我的Linux ubuntu系统上,并试图从文本文件中绘制数据点。当我点击execute时,终端告诉我没有识别的matplotlib,即使它包含在anaconda中

我已确保matplotlib已安装并且是最新的。我的系统告诉我它已安装,但Geany(我的IDE)不会识别它已安装

import matplotlib.pyplot as plt
import csv
x = []
y = []

with open('data.v3.txt') as datafile:
    plots = csv.reader(datafile, delimiter=',')
    for row in plots:
        x.append(int(row[0]))
        y.append(int(row[1]))

plt.plot(x,y, label='Loaded from file!')
plt.xlabel('x')
plt.ylabel('y')
plt.title('Data')
plt.legend()
plt.show()

我应该在终端中显示一个绘图,但我总是会收到错误消息:“没有名为‘matplotlib’的模块”

您需要使用python3“%f”而不是python“%f”在Geany中更改run命令。

如何检查?我使用的是Geany,所以我是否应该将编译器和执行器从Geany的菜单
build
中的“set build commands?”更改为anaconda,您可以定义自己的工具,并在那里定义Geany使用的Python路径。