[英]No module named 'win32api' // PY2EXE
I am using Python 3.6.7 in conda 4.5.12 (Win10,64bit) and I want to compile my Python project to an .exe-File using Pyinstaller (3.5 dev).我在 conda 4.5.12 (Win10,64bit) 中使用 Python 3.6.7,我想使用 Pyinstaller (3.5 dev) 将我的 Python 项目编译为 .exe 文件。 I keep getting the same error:
我不断收到同样的错误:
ModuleNotFoundError: No module named 'win32api'
[65600] Failed to execute script pyi_rth_win32comgenpy
I already reinstalled pywin32 as recommended in 25314463 , the import of win32com works.我已经重新安装pywin32作为推荐25314463 ,win32com的进口工作。 I also tried:
我也试过:
pip install pypiwin32
as described in 21343774 .如21343774 中所述。 The Installation was successful.
安装成功。 But I still get the same Error.
但我仍然得到同样的错误。
pip install pywin32
from 827 does not solve the problem either.从827也不能解决问题。 Also I tried to import win32api , win32com and pywin32 in my .spec-file with the matching paths, but still no success.
此外,我尝试使用匹配的路径在我的 .spec 文件中导入win32api 、 win32com和pywin32 ,但仍然没有成功。
How can this error be fixed?如何修复此错误?
Sometimes it happened to me on Windows that installed package is not visible.有时我在 Windows 上遇到安装包不可见的情况。 Try first uninstalling it:
首先尝试卸载它:
pip uninstall pypiwin32
Make sure it has been removed:确保它已被删除:
pip list
Then install from scratch:然后从头安装:
pip install --no-cache pypiwin32
Make sure it is installed:确保它已安装:
pip list
You might see pywin32
in the list.您可能会在列表中看到
pywin32
。
Just pypiwin32
didn't do it for me.只是
pypiwin32
没有为我做。 It worked only when I uninstalled all libs related to pywin32 and then installed again它仅在我卸载与 pywin32 相关的所有库然后再次安装时才有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.