Pyinstaller - ImportError: No system module 'pywintypes' (pywintypes27.dll)

前端 未结 8 783
温柔的废话
温柔的废话 2021-01-11 18:03

I am trying to package my python script into an executable. I thought I would be pretty straight forward as I don\'t have very many imports. First off here are my imports:

8条回答
  •  耶瑟儿~
    2021-01-11 18:54

    I had the same problem. The dll, pywintypes27.dll was in C:\Python27\Lib\site-packages\pywin32_system32. I added this directory to my PATH environment variable and py2exe was able to find the DLL. Obviously, setting the path is not the correct solution (and you could possibly do it programatically via os.environ), but, works for me.

提交回复
热议问题