首页 > 解决方案 > pyinstaller 无法处理多个警告和错误

问题描述

我正在尝试将我的脚本转换为 .exe 文件。当我使用 Pyinstaller 时,我收到了几个警告和错误,但它不起作用:

  1. 193691 WARNING: Unable to find package for requirement greenlet from package gevent. 193691 WARNING: Unable to find package for requirement zope.event from package gevent. 193691 WARNING: Unable to find package for requirement zope.interface from package gevent. 我安装了 gevent 包,但这些警告仍然出现

2)\anaconda3\lib\site-packages\numpy\__init__.py:138: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service 我安装了 mkl-service 包,但仍然出现此消息

3)ImportError: DLL load failed while importing _multiarray_umath: The module is not found. 我正在使用 Anaconda 导航器,我没有任何额外的虚拟环境。我有 numpy 1.19.2 和 Python3.8。

  1. 最后我得到PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyInstaller_hooks_0_numpy_core required by hook for module anaconda3\lib\site-packages\PyInstaller\hooks\hook-numpy.core.py. Please check whether module __PyInstaller_hooks_0_numpy_core actually exists and whether the hook is compatible with your version of \anaconda3\lib\site-packages\PyInstaller\hooks\hook-numpy.core.py:

我尝试卸载 anaconda 和 numpy 并重新安装它。我尝试检查 Path 环境变量。一切都没有运气。

标签: python-3.xnumpypackagepyinstallerimporterror

解决方案


推荐阅读