前提:自己已经下载装好了Python3.x,下面是我逐步尝试搜索后出现的各类爆粗信息和截图,现在已经最后正确的方法汇总到文章前面,方便自取。
Windows10系统,操作均在cmd命令行窗口内进行
1、装pip: “python -m pip install --upgrade pip
”;
2、装robotframework: “pip install robotframework-ride
”;
3、装wxPython: “pip install wxPython
”,查看wx版本安装是否成功的参考链接;
4、输入python,进入python环境,再输入”import wx
“没有报错就可以继续下一步;
5、双击ride.py程序还是闪退,或者命令行直接输入“ride.py
”没有弹出可视弹窗;
报错内容如下:
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ..\..\src\common\intl.cpp(1579) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
OnInit returned false, exiting...
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ..\..\src\common\wincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed
6、找到python文件夹里的application.py文件,在“wx.HelpProvider.set(wx.SimpleHelpProvider)
”的下一行加上“self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
”这句,要注意用空格不要用Tab键。
7、再次双击ride.py图标,成功唤起图形化界面。