python - Python 代码适用于解释器,但在我使用 pyinstaller 时不起作用
问题描述
我正在创建一个机器人,我正在使用 pandas、numpy 和 sklearn 之类的库,并且我还在虚拟环境中安装了所有这些库。该机器人在 Pycharm 上运行良好,但是当我使用 pyinstaller 并创建一个独立的时,它的独立显示此错误:
Traceback (most recent call last):
File "PyInstaller\loader\pyiboot01_bootstrap.py", line 167, in __init__
File "ctypes\__init__.py", line 373, in __init__
FileNotFoundError: Could not find module 'C:\Users\vabha\AppData\Local\Temp\_MEI38962\sklearn\.libs\vcomp140.dll' (or one of its dependencies). Try using the full path with constructor syntax.
上述异常是以下异常的直接原因:
Traceback (most recent call last):
File "chandlerbing.py", line 3, in <module>
from sklearn.pipeline import Pipeline
.
.
.
解决方案
控制台调试说FileNotFoundError ... 让我为你翻译一下。
vcomp140.dll is missing and need to be used
你有它在临时位置,现在不再是了。也试试看这个答案,或者你也可以试试Auto Py To Exe可能会起作用。
推荐阅读
- php - 使用 PHP Smarty 框架添加弹出窗口
- laravel-5 - Laravel:更新数据失败
- json-c - json-c:在 json_tokener_parse 中出现分段错误
- java - 模块必须设置匕首2
- java - 如何使用 maven 查看文件名格式
- sml - ML中的AVL树-向左旋转,警告:匹配非穷举
- windows - Spring Boot 应用程序在 Windows 10 上启动,但在 OS X (HS) 上不启动
- php - 将变量返回到视图
- reactjs - React-bootstrap:一行中的两列未呈现
- python - 从 beautifulsoup 结果中删除HTML 标记