oranges98 2023-03-10 21:39 采纳率: 62.5%
浏览 36
已结题

pyinstaller打包出现报错lib not found

pyinstaller 后会出现以下报错,而且exe文件打不开,怎么办?有什么解决办法?请教各位~QAQ

1586 WARNING: lib not found: mkl_rt.1.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\mkl_py_mkl_service.cp39-win_amd64.pyd
1595 WARNING: lib not found: mkl_rt.1.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\mkl_mklinit.cp39-win_amd64.pyd
1605 WARNING: lib not found: mkl_rt.1.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\numpy\core_multiarray_umath.cp39-win_amd64.pyd
1624 WARNING: lib not found: mkl_rt.1.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\numpy\linalg\lapack_lite.cp39-win_amd64.pyd
1665 WARNING: lib not found: mkl_rt.1.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\numpy\linalg_umath_linalg.cp39-win_amd64.pyd
1686 WARNING: lib not found: opencv_wechat_qrcode460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1692 WARNING: lib not found: opencv_barcode460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1698 WARNING: lib not found: opencv_xfeatures2d460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1703 WARNING: lib not found: opencv_ximgproc460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1710 WARNING: lib not found: opencv_calib3d460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1716 WARNING: lib not found: opencv_reg460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1721 WARNING: lib not found: opencv_rapid460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1727 WARNING: lib not found: opencv_photo460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1733 WARNING: lib not found: opencv_videoio460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1738 WARNING: lib not found: opencv_imgproc460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1744 WARNING: lib not found: opencv_line_descriptor460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1750 WARNING: lib not found: opencv_intensity_transform460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1756 WARNING: lib not found: opencv_fuzzy460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1762 WARNING: lib not found: opencv_hdf460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1768 WARNING: lib not found: opencv_dnn_superres460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1774 WARNING: lib not found: opencv_optflow460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1780 WARNING: lib not found: opencv_surface_matching460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1786 WARNING: lib not found: opencv_structured_light460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1792 WARNING: lib not found: opencv_shape460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1797 WARNING: lib not found: opencv_dnn460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1804 WARNING: lib not found: opencv_features2d460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1811 WARNING: lib not found: opencv_img_hash460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1817 WARNING: lib not found: opencv_plot460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1825 WARNING: lib not found: opencv_rgbd460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1831 WARNING: lib not found: opencv_ml460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1837 WARNING: lib not found: opencv_objdetect460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1842 WARNING: lib not found: opencv_bgsegm460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1848 WARNING: lib not found: opencv_hfs460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1854 WARNING: lib not found: opencv_alphamat460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1861 WARNING: lib not found: opencv_flann460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1866 WARNING: lib not found: opencv_video460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1873 WARNING: lib not found: opencv_stereo460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1878 WARNING: lib not found: opencv_xphoto460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1884 WARNING: lib not found: opencv_aruco460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1890 WARNING: lib not found: opencv_imgcodecs460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1896 WARNING: lib not found: opencv_stitching460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1902 WARNING: lib not found: opencv_highgui460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1908 WARNING: lib not found: opencv_core460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1914 WARNING: lib not found: opencv_face460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1920 WARNING: lib not found: opencv_quality460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1926 WARNING: lib not found: opencv_text460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1931 WARNING: lib not found: opencv_ccalib460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1937 WARNING: lib not found: opencv_tracking460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1943 WARNING: lib not found: opencv_saliency460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1948 WARNING: lib not found: opencv_gapi460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1954 WARNING: lib not found: opencv_mcc460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd
1960 WARNING: lib not found: opencv_phase_unwrapping460.dll dependency of C:\Users\LYX.conda\envs\py39\lib\site-packages\cv2.cp39-win_amd64.pyd

  • 写回答

5条回答 默认 最新

  • dahe0825 2023-03-10 21:47
    关注

    参考GPT的回答和自己的思路,这个报错提示是因为打包程序时缺失了一些动态链接库(DLL),通常这些DLL是第三方库的依赖项。下面是解决此问题的步骤:

    1.确认依赖项:通过报错信息查找缺失的DLL文件。例如,在上面的报错信息中,缺失的DLL文件为“mkl_rt.1.dll”和“opencv_xfeatures2d460.dll”等。如果您使用的是第三方库,也可以查看该库的文档或支持站点,以查找库的依赖项。

    2.添加缺失的DLL:将缺失的DLL文件添加到打包的应用程序文件夹中。这可以通过手动复制DLL文件或使用打包工具的“添加文件”选项来完成。如果您使用的是PyInstaller,可以使用以下命令将DLL文件添加到打包文件夹中:

    pyinstaller --add-binary "path/to/dll;." your_script.py
    

    请注意,您需要将“path/to/dll”替换为缺失的DLL文件的路径,将“your_script.py”替换为要打包的脚本的名称。该命令将DLL文件添加到打包文件夹的根目录中。

    3.添加路径:如果DLL文件位于其他文件夹中,请将其路径添加到系统的PATH环境变量中。这可以通过以下步骤完成:

    a. 在Windows操作系统上,右键单击“计算机”或“此电脑”,然后选择“属性”>“高级系统设置”>“环境变量”。

    b. 在“系统变量”中找到“PATH”,然后单击“编辑”。

    c. 单击“新建”,然后将DLL文件所在的文件夹路径添加到列表中。

    d. 单击“确定”关闭所有对话框。

    尝试上述步骤后,再次运行打包的应用程序,看看是否能够解决问题。如果问题仍然存在,请尝试重新安装缺失的库,并确保将所有依赖项添加到打包文件夹中。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

问题事件

  • 系统已结题 3月19日
  • 已采纳回答 3月11日
  • 创建了问题 3月10日

悬赏问题

  • ¥15 VB.NET操作免驱摄像头
  • ¥15 笔记本上移动热点开关状态查询
  • ¥85 类鸟群Boids——仿真鸟群避障的相关问题
  • ¥15 CFEDEM自带算例错误,如何解决?
  • ¥15 有没有会使用flac3d软件的家人
  • ¥20 360摄像头无法解绑使用,请教解绑当前账号绑定问题,
  • ¥15 docker实践项目
  • ¥15 利用pthon计算薄膜结构的光导纳
  • ¥15 海康hlss视频流怎么播放
  • ¥15 Paddleocr:out of memory error on GPU