"The debugger backend could not be started." Eric 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 的"shell"选项卡中工作过。所以我破坏了一些东西,无法修复它。

我应该尝试卸载 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()
  1. 我通过删除.ini文件来重新设置我的配置。(来自 Eric6 文档("重置用户配置。如果需要,可以重置 Eric 的"首次使用"条件,只需删除您在 \AppData\Roaming\Eric6 "隐藏"目录中找到的".ini"文件;下一次埃里克运行将 因此,像第一次一样执行。
  2. 然后,我再次按照此页面上非常有用的说明(http://techattitude.com/tips-tricks-and-hacks/how-to-install-eric6-ide-for-python-on-windows/(重置以下内容:
  3. 在eric6中:设置,首选项,自动完成,Qsintilla。选择"从文档和 API 文件">
  4. 在eric6:settings,preferences,editor,API:Language,Python3中,确保Python-3.5.api列在APIs下。
  5. 我点击了"编译API。对于两种 Python3 语言下拉列表,并对 QScintilla 重复相同的内容。

不再收到调试器未启动的错误消息! ;)更新这篇文章,以防这个答案对其他人有帮助。我认为问题是由于不知道在哪里安装了什么,路径和/或工作目录位置中的内容,和/或python和Qsintilla版本。不是100%确定。当我安装各种东西(Python、Eric 等(时,不确定哪些项目安装在哪些目录中,并且在安装 python 或模块期间可能没有选中"添加到路径"的可能结果。

最新更新