Auto-Py-To-Exe - win32api - ModuleNotFoundError

五迷三道 提交于 2021-01-29 16:10:27

问题


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 *

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

Anyone know a way to fix it?


回答1:


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.

Thank you for answering tho!



来源:https://stackoverflow.com/questions/60823539/auto-py-to-exe-win32api-modulenotfounderror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!