Auto-Py-To-Exe - win32api - ModuleNotFoundError [英] Auto-Py-To-Exe - win32api - ModuleNotFoundError
问题描述
我一直在尝试编译一个使用这些导入的 python 项目
I have been attempting to compile a python project that uses these imports
import os
import numpy
import sys
import pytube
import time
from moviepy.editor import *
我已经通过 pip 安装了所有这些,我也一直在寻找故障排除技巧,但似乎没有一个有效.通过 Auto-py-to-exe 执行构建的可执行文件时,我不断收到此错误.
I have installed all of them via pip and I have also been looking around for trouble shooting tips but none of them seem to work. I keep getting this error when executing the built executable via Auto-py-to-exe.
Traceback (most recent call last):
File "C:\Users\*****\AppData\Local\Programs\Python\Python38\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py", line 49, in <module>
import win32com
File "c:\users\*****\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\win32com\__init__.py", line 5, in <module>
ModuleNotFoundError: No module named 'win32api'
[17344] Failed to execute script pyi_rth_win32comgenpy
有人知道解决方法吗?
推荐答案
所以我确实安装了 pypiwin32.原来我的 AntiVirus 软件肯定出了问题,或者它没有注册,但在重新启动我的计算机并再次运行 pip install 后,它自行修复了.
so I did install pypiwin32. Turns out something must have gone wrong with my AntiVirus software or it did not register but after restarting my computer and running the pip install once again it fixed itself.
谢谢你的回答!
这篇关于Auto-Py-To-Exe - win32api - ModuleNotFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!