首页 > 解决方案 > “调试器后端无法启动。” 埃里克 6 IDE Python 3.x

问题描述

python新手,以前用过matlab。

我收到一条错误消息:“无法启动调试器后端。” 当我尝试在 Python 的 Eric IDE 编辑器中运行任何脚本时。(我正在使用各种简单的代码示例来导入和可视化数据。下面是借用代码的示例。)

我安装了 python 3.6 和 Python 3.5(我应该卸载其中一个吗?)我下载了 Eric 以用作编辑器和调试器并以管理员身份安装。

Eric Python 文档中,我没有找到解决方案。我确实查看了调试首选项,并尝试了 Python 3.5 和 Python 3.6 的路径 所以我打破了一些东西,无法修复它。

我应该尝试卸载 Eric 和 Python 的两个版本(3.5 和 3.6)并从头开始吗?

我认为我的问题可能与路径、文件位置等、安装目录有关,真的不确定,经过大量搜索后在网上找不到任何有用的东西。

我也不确定“运行脚本”窗口中的“解释器:”和“工作目录:”中应该包含哪些路径(完整目录文件名)。

非常感谢任何帮助!提前致谢。

丽贝卡

# Numpy (data import, manipulation, export)
import numpy as np
# Matplotlib (create trends)
import matplotlib.pyplot as plt

# load the data file
data_file = np.genfromtxt('data_file.txt', delimiter=',')

# create time vector from imported data (starts from index 0)
time = data_file[:,0]
# parse good sensor data from imported data
sensors = data_file[:,1:5]

# display the first 6 sensor rows
print(sensors[0:6])

# adjust time to start at zero by subtracting the
#  first element in the time vector (index = 0)
time = time - time[0]

# calculate the average of the sensor readings
avg = np.mean(sensors,1) # over the 2nd dimension

# export data
# stack time and avg as column vectors
my_data = np.vstack((time,sensors.T,avg))
# transpose data
my_data = my_data.T
# save text file with comma delimiter
np.savetxt('export_from_python.txt',my_data,delimiter=',')

# generate a figure
plt.figure(1)
plt.plot(time/60.0,sensors[:,1],'ro')
plt.plot(time/60.0,avg,'b.')
# add text labels to the plot
plt.legend(['Sensor 2','Average Sensors 1-4'])
plt.xlabel('Time (min)')
plt.ylabel('Sensor Values')
# save the figure as a PNG file
plt.savefig('my_Python_plot.png')
# show the figure on the screen (pauses execution until closed)
plt.show()

标签: pythonpython-3.xideeditoreric-ide

解决方案



推荐阅读