WARNING: Several hooks defined for module ‘win32ctypes.core‘. Please take care they do not conflict

本文主要是介绍WARNING: Several hooks defined for module ‘win32ctypes.core‘. Please take care they do not conflict,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

问题:

python pyinstaller打包错误:

WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.

解决过程:

安装pypiwin32

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pypiwin32

依然报错,如下图所示:
在这里插入图片描述

解决办法:

最终发现是因为导包问题引起的,两个依赖库确实已经安装只是导入方式不同导致报错。

在python安装路径下找到Lib/site-packages/Pyinstaller目录下有个compat.py文件定位到212行

源码如下:

if is_win:
try:
from win32ctypes.pywin32 import pywintypes # noqa: F401
from win32ctypes.pywin32 import win32api
except ImportError:
xxxx
xxxx

做如下修改:将两个from改为import

if is_win:
try:
# from win32ctypes.pywin32 import pywintypes # noqa: F401
# from win32ctypes.pywin32 import win32api
import pywintypes
import win32api
except ImportError:
xxxx
xxxx

运行成功。

参考文档:https://blog.csdn.net/weixin_32831351/article/details/111920888

这篇关于WARNING: Several hooks defined for module ‘win32ctypes.core‘. Please take care they do not conflict的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/642135

相关文章

nginx-rtmp-module模块实现视频点播的示例代码

《nginx-rtmp-module模块实现视频点播的示例代码》本文主要介绍了nginx-rtmp-module模块实现视频点播,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习... 目录预置条件Nginx点播基本配置点播远程文件指定多个播放位置参考预置条件配置点播服务器 192.

nginx-rtmp-module构建流媒体直播服务器实战指南

《nginx-rtmp-module构建流媒体直播服务器实战指南》本文主要介绍了nginx-rtmp-module构建流媒体直播服务器实战指南,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有... 目录1. RTMP协议介绍与应用RTMP协议的原理RTMP协议的应用RTMP与现代流媒体技术的关系2

使用Vue.js报错:ReferenceError: “Vue is not defined“ 的原因与解决方案

《使用Vue.js报错:ReferenceError:“Vueisnotdefined“的原因与解决方案》在前端开发中,ReferenceError:Vueisnotdefined是一个常见... 目录一、错误描述二、错误成因分析三、解决方案1. 检查 vue.js 的引入方式2. 验证 npm 安装3.

Unable to instantiate Action, goodsTypeAction, defined for 'goodsType_findAdvanced' in namespace '/

报错: Unable to instantiate Action, goodsTypeAction,  defined for 'goodsType_findAdvanced' in namespace '/'goodsTypeAction......... Caused by: java.lang.ClassNotFoundException: goodsTypeAction.......

解决The valid characters are defined in RFC 7230 and RFC 3986

解决方法: 一、更换低版本的Tomcat;(我选的方案) 二、参考:https://blog.csdn.net/qq_32365919/article/details/82055800

jupyter在加载pkl文件时报错ModuleNotFoundError: No module named 'pandas.core.internals.managers'; '的解决方法

笔者当看到这个错误的时候一脸懵逼,在pycharm上正常运行的code 放在jupyter就不成了,于是就研究一翻。 一开始以为自己的pkl文件有问题,研究重点放在这里,最后发现不是。 然后取搜索pycharm和jupyter下的python的\Lib\site-packages\pandas\core\internals有什么不同 发现jupyter下没有pandas\core\intern

解决PHP Warning: strftime(): It is not safe to rely on the system's timezone set

当运行一些程序时,在httpd日志中会有如下警告日志: PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set(

【NodeJS】Error: Cannot find module 'ms'

转载自:http://blog.csdn.net/echo_ae/article/details/75097004 问题: Error: Cannot find module 'ms'at Function.Module._resolveFilename (module.js:469:15)at Function.Module._load (module.js:417:25)at Module

【虚拟机/服务器】配置ngx_http_empty_gif_module记录

下载Nginx源码 查看Nginx内置模块 1、在可视化界面中 可以看到 ngx_http_empty_gif_module.c 是Nginx的内置模块,不需要再进行安装 2、在bash命令行中 tar nginx 解压后进入nginx目录,./configure --help | grep empty_gif 即可查看我想要的 ngx_http_empty_gif_module

多个,多层嵌套module,打aar包

参考https://blog.51cto.com/4259297/1699714 1.在要打包的module中下添加fat-aar.gradle文件。(该文件只能在项目个gradle是2.3.3是才可食用) 2.把项目的gradle修改为2.3.3,但是不打包的gradle依然是以前的。 3.由于打包的的gradle和不打包的是不一样的,所以需要在修改gradle的文件中的添加判断标志