简体   繁体   English

在PyQt应用中处理丢失的软件包或DLL

[英]Handling missing packages or DLLs in a PyQt app

What's a good way to handle fatal errors - missing packages, .ui files not compiled, Qt DLLs or shared objects not found, etc. - in a PyQt app (or other Python app)? 在PyQt应用程序(或其他Python应用程序)中处理致命错误(丢失包,未编译的.ui文件,找不到Qt DLL或共享对象等)的好方法是什么?

Displaying a cross-platform message box without Qt DLLs or shared objects seems like a lot of work. 显示没有Qt DLL或共享对象的跨平台消息框似乎需要很多工作。 Dumping a message to the console seems not very helpful, since the end user will likely not see the console. 将消息转储到控制台似乎不是很有帮助,因为最终用户可能看不到控制台。 How do other Python apps handle this? 其他Python应用程序如何处理呢? Or do they simply assume that a properly installed app won't run into these problems? 还是只是假设正确安装的应用程序不会遇到这些问题?

distutils模型可以正确安装python应用程序,或者有一个第三方setuptools软件包,对于最终用户来说更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM