成功解决module = loader.load_module(fullname) ImportError: DLL load failed: 找不到指定的模块。-阿里云开发者社区

开发者社区> 一个处女座的程序猿> 正文

成功解决module = loader.load_module(fullname) ImportError: DLL load failed: 找不到指定的模块。

简介: 成功解决module = loader.load_module(fullname) ImportError: DLL load failed: 找不到指定的模块。
+关注继续查看

解决问题


module = loader.load_module(fullname)ImportError: DLL load failed: 找不到指定的模块。


Traceback (most recent call last):

 File "CV Detection Smiling Sex bakup\CV_Object.py", line 205, in on_pushButton_9_clicked

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "CV Detection Smiling Sex bakup\utils\datasets.py", line 1, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\io\__init__.py", line 97, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\io\matlab\__init__.py", line 13, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\io\matlab\mio.py", line 12, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\io\matlab\miobase.py", line 22, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\misc\__init__.py", line 68, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\interpolate\__init__.py", line 175, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\interpolate\interpolate.py", line 20, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\linalg\__init__.py", line 190, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\linalg\misc.py", line 5, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "scipy\linalg\blas.py", line 214, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module

   module = loader.load_module(fullname)

ImportError: DLL load failed: 找不到指定的模块。

有的网友说需要更新pillow库,pip install pillow

image.png





解决方法


T1、搜索路径


找了下是路径不对,指定搜索路径就好了,如下

pyinstaller --path C:\Users\leon\AppData\Local\Programs\Python\Python35\Lib\site-packages\PyQt5\Qt\bin -F name.py

pyinstaller --path F:\Program Files\Python\Python36\Lib\site-packages\PyQt5\Qt\bin -F CV_Object.py


T2、放在前边


将调用的自定义的函数文件放在最前边,而不是放在按钮命令下,比如


image.png



T3、找到出错的位置继续更新库

image.png




Traceback (most recent call last):

 File "CV Detection Smiling Sex bakup\CV_Object.py", line 23, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "CV Detection Smiling Sex bakup\yolo.py", line 13, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\__init__.py", line 7, in <module>

   from . import datasets

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\datasets\__init__.py", line 4, in <module>

   from . import activations

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\datasets\imdb.py", line 8, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\preprocessing\__init__.py", line 12, in <module>

   from . import callbacks

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\preprocessing\image.py", line 7, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras_preprocessing\image.py", line 9, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\__init__.py", line 186, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\misc.py", line 5, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\blas.py", line 196, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module

   module = loader.load_module(fullname)

ImportError: DLL load failed: 找不到指定的模块。

[18756] Failed to execute script CV_Object

Traceback (most recent call last):

 File "CV Detection Smiling Sex bakup\CV_Object.py", line 34, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "CV Detection Smiling Sex bakup\utils.py", line 5, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\__init__.py", line 7, in <module>

   from . import datasets

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\datasets\__init__.py", line 4, in <module>

   from . import activations

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\datasets\imdb.py", line 8, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\preprocessing\__init__.py", line 12, in <module>

   from . import callbacks

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\preprocessing\image.py", line 7, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras_preprocessing\image.py", line 9, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\__init__.py", line 186, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\misc.py", line 5, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\blas.py", line 196, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module

   module = loader.load_module(fullname)

ImportError: DLL load failed: 找不到指定的模块。

[29928] Failed to execute script CV_Object

T4、问题原因numpy没找到支持blas的库


(1)先下载numpy+mkl

(2)并添加到环境变量里面

image.png


Traceback (most recent call last):

 File "CV Detection Smiling Sex no voice\CV_Object.py", line 21, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "CV Detection Smiling Sex no voice\yolo.py", line 13, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\__init__.py", line 7, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\datasets\__init__.py", line 4, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\datasets\imdb.py", line 8, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\preprocessing\__init__.py", line 12, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras\preprocessing\image.py", line 7, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\keras_preprocessing\image.py", line 9, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\__init__.py", line 190, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\misc.py", line 5, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

   exec(bytecode, module.__dict__)

 File "site-packages\scipy\linalg\blas.py", line 214, in <module>

 File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module

   module = loader.load_module(fullname)

ImportError: DLL load failed: 找不到指定的模块。

[8496] Failed to execute script CV_Object

T5、将缺少的dll文件赋值到exe所在文件夹


image.png


大功告成!


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
4068 0
用户 'XXX\SERVERNAME$' 登录失败。 原因: 找不到与提供的名称匹配的登录名。 [客户端: ]
一工厂的中控服务器遇到了下面Alert提示,'XXX\SERVERNAME$'  XXX表示对应的域名, SERVERNAME$(脱敏处理,SERVERNAME为具体的服务器名称+$),而且如下所示,客户端是本机,研究了一下,才搞清楚具体原因.       日期/时间:  2017/6/20 12:24:51   说明:   用户 'XXX\SERVERNAME$' 登录失败。
835 0
springboot打包成jar包后找不到xml,找不到主类的解决方法
springboot打包成jar包后找不到xml,找不到主类的解决方法 请首先保证你的项目能正常运行(即不打包的时候运行无误),我们在打包时经常遇到如下问题: springboot打包成jar包后找不到xml,找不到主类 我的解决方法 请将build文...
2833 0
FilenameFilter文件名过滤器——列出指定类型文件实现
  Java的IO操作中File有列出指定目录的文件的方法。如果要列出指定类型的文件,需使用FilenameFilter对象。   FilenameFilter是一个接口,所以需要写一个实现类来实现该接口。
761 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
4485 0
使用OpenApi弹性释放和设置云服务器ECS释放
云服务器ECS的一个重要特性就是按需创建资源。您可以在业务高峰期按需弹性的自定义规则进行资源创建,在完成业务计算的时候释放资源。本篇将提供几个Tips帮助您更加容易和自动化的完成云服务器的释放和弹性设置。
7758 0
Windows7下找不到输入音频设备的解决方法
Windows7默认禁用了声卡的某些输入,所以需要手动启用。解决步骤:1、右击任务栏音量按钮。2、选择“录音设备”3、选择“录音”面板,右击选择“显示禁用的设备”4、右击你想要启用的设备(内录应该选择立体声混音)OK,解决。
811 0
CV:基于Keras利用CNN主流架构之mini_XCEPTION训练情感分类模型hdf5并保存到指定文件夹下
CV:基于Keras利用CNN主流架构之mini_XCEPTION训练情感分类模型hdf5并保存到指定文件夹下
24 0
+关注
一个处女座的程序猿
国内互联网圈知名博主、人工智能领域优秀创作者,全球最大中文IT社区博客专家、CSDN开发者联盟生态成员、中国开源社区专家、华为云社区专家、51CTO社区专家、Python社区专家等,曾受邀采访和评审十多次。仅在国内的CSDN平台,博客文章浏览量超过2500万,拥有超过57万的粉丝。
1701
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载