“无法启动调试器后端。”eric6idepython3.x

2024-06-16 12:48:21 发布

您现在位置:Python中文网/ 问答频道 /正文

python新手,以前用过Matlab。在

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

我安装了python3.6和python3.5(是否应该卸载其中一个?) 我下载了Eric作为编辑器和调试器,并作为管理员安装。在

Eric Python documentation中,我没有找到解决方案。我确实查看了调试的首选项,并尝试了python3.5和python3.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()

Tags: thefrom路径datatimeplotmyas
1条回答
网友
1楼 · 发布于 2024-06-16 12:48:21
  1. 我通过删除.ini文件来重新设置配置。(来自Eric6文档)“重置用户配置。如果需要,可以重置Eric“首次使用”条件,只需删除在\AppData\Roaming\Eric6“hidden”目录中找到的“.ini”文件;下一次Eric运行将 因此,像第一次一样执行。-“
  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列在api下面。在
  5. 我点击“编译API”。对于Python3语言下拉列表和QScintilla重复相同的操作。在

不再收到调试器未启动的错误消息!;)更新此帖子,以防这个答案对其他人有所帮助。我认为问题是由于不知道什么安装在哪里,路径和/或工作目录的位置,以及/或python和Qsintilla版本。不是百分之百肯定。可能的结果是,当我安装各种东西(Python、Eric等)时,不确定哪些项目安装在哪些目录中,可能在安装Python或模块时没有检查“addtopath”。在

相关问题 更多 >