ImportError: unable to find Qt5Core.dll on PATH
一、实验环境
1.Windows7x32_SP1
2.python3.7.4
3.pyinstaller3.5
二、问题描述
1.一直都是在Windows10x64上使用pyinstaller打包exe程序,发现exe程序在Windows7x32上无法正常运行。
想起之前某位大神的建议,打包exe程序时最好在32位系统上
2.部署如上实验环境,pyinstaller打包时报错:ImportError: unable to find Qt5Core.dll on PATH
三、解决方式1
2.新建fix_qt_import_error.py,代码如下:
# Fix qt import error
# Include this file before import PyQt5
import os
import sys
import logging def _append_run_path():
if getattr(sys, 'frozen', False):
pathlist = [] # If the application is run as a bundle, the pyInstaller bootloader
# extends the sys module by a flag frozen=True and sets the app
# path into variable _MEIPASS'.
pathlist.append(sys._MEIPASS) # the application exe path
_main_app_path = os.path.dirname(sys.executable)
pathlist.append(_main_app_path) # append to system path enviroment
os.environ["PATH"] += os.pathsep + os.pathsep.join(pathlist) logging.error("current PATH: %s", os.environ['PATH']) _append_run_path()
3.主程序导入PyQt5相关库之前导入fix_qt_import_error.py
import fix_qt_import_error
四、解决方式2
1.参考文档:https://github.com/pyinstaller/pyinstaller/issues/2152
2.pyinstaller命令中添加--path参数,示例如下:
pyinstaller --path C:\Python35-32\Lib\site-packages\PyQt5\Qt\bin test.py
ImportError: unable to find Qt5Core.dll on PATH的更多相关文章
- PyQt5遇到的一个坑 "ImportError: unable to find Qt5Core.dll on PATH" 及解决办法
最近再实现一个功能,主要是将自动化测试界面化 环境组合为:Windows 64bit + PyCharm + Python + PyQt5 + Pyinstaller + Inno Setup PS ...
- TensorFlow 解决“ImportError: Could not find 'cudnn64_6.dll'”
解决“ImportError: Could not find 'cudnn64_6.dll'” 1. 问题描述 运行一个基于Tensorflow的代码时报错,如下所示: ImportError: Co ...
- adcfgclone.pl appsTier报错Unable to locate 'linkxlC' utility in path
$ cd /u01/dev/apps/apps_st/comn/clone/bin$ perl adcfgclone.pl appsTier Copyrigh ...
- Unable to write inside TEMP environment path
安装PostgreSQL 9:Unable to write inside TEMP environment path 注册表:regedit HKEY_CLASSES_ROOT\.vbs,设置默认为 ...
- tensorflow遇到ImportError: Could not find 'cudart64_100.dll'错误解决
在安装tensorflow的时候,使用import tensorflow出现了找不到dll文件的错误,参考了很多博客和stackflow的解决方案,发现其中只说了版本号不匹配,但是没有具体说明什么样的 ...
- 彻底解决tensorflow:ImportError: Could not find 'cudart64_90.dll' tensorflow安装
今天装tensorflow-gpu出现了很多问题 1.pip install tensorflow-gpu下载过慢 解决办法可查看 Python机器学习常用模块 2.安装完tensorflow以后,运 ...
- qt无法定位程序输入点 于动态链接库 qt5core.dll
造成步骤:一开始是将现成的dll[Qt5.9.3]放在文件夹里,然后使用Qt5.7.1编译的exe放进去,产生标题错误 原因:dll库不匹配 解决:使用Qt5.7.1自带的cmd命令行,使用winde ...
- 安装postgresql碰到Unable to write inside TEMP environment path
搞了半天,原来是 AVAST搞的鬼,把原来注册表的键值改成它自己了.其实应该是 C:\Windows\System32\vbscript.dll The answer in the following ...
- tensorflow运行出现错误 : ImportError: Could not find 'cudart64_90.dll'.
安装 tensorflow-gpu 版本后,需要安装相应的 CUDA 和 cuDNN 注意版本问题:tensorflow-gpu 1.7以及之后的版本要安装 CUDA 8.0 以上的版本,tf 1.7 ...
随机推荐
- 数据库死锁的问题,Deadlock found when trying to get lock; try restarting transaction at Query.formatError
场景: 应用刚上线排除大批量请求的问题 线上多次出现的Deadlock found when trying to get lock错误 代码: async batchUpdate(skus, { tr ...
- Navicat Premium 连接oracle 提示ORA-01017:用户名/口令无效;登陆被拒绝
Navicat Premium 连接oracle,密码明明是对的,还是提示 ORA-01017:用户名/口令无效:登陆被拒绝.而用Pl/SQL 连接没有问题. 其实用户名和密码是对的,但还是会报错,这 ...
- leetcode-字符串篇
Implement strStr() /** * Implement strStr(). * * Return the index of the first occurrence of needle ...
- SpringCloud微服务(04):Turbine组件,实现微服务集群监控
本文源码:GitHub·点这里 || GitEE·点这里 写在前面,阅读本文前,你需要了解熔断器相关内容 SpringCloud微服务:Hystrix组件,实现服务熔断 一.聚合监控简介 1.Dash ...
- (五十七)c#Winform自定义控件-传送带(工业)-HZHControls
官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...
- .NET Core C# 中级篇2-7 文件操作
.NET Core CSharp 中级篇2-7 本节内容为文件操作 简介 文件操作在我们C#里还是比较常见的,例如我们读取Excel.Txt文件的内容,在程序中,这些文件都是以流的方式读取进入我们内存 ...
- (转)格拉布斯准则(Grubbs Criterion)处理数据异常
格拉布斯准则:https://baike.baidu.com/item/%E6%A0%BC%E6%8B%89%E5%B8%83%E6%96%AF%E5%87%86%E5%88%99/3909586 G ...
- 爬虫爬取m3u8视频文件
一.m3u8视频格式 一般m3u8文件和 视频流ts文件放在同一目录 而m3u8文件格式存放的一般都是ts 文件的一个列表 二.根据m3u8视频存放以及写法的规律 思路 我们一般网站上能找到的m3u8 ...
- 订单结算submit_order.php扣库存,扣账号金额(学生笔记)
<?php header("Content-type: text/html; charset=utf-8"); session_start(); include_once(& ...
- 【C#】学习笔记 abstract、virtual、interface使用的一些栗子
上