[GH-ISSUE #78] Cannot install Py-to-Exe #77

Closed
opened 2026-02-26 12:20:24 +03:00 by kerem · 29 comments
Owner

Originally created by @SekandarPro01 on GitHub (Nov 18, 2019).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/78

Screenshot (6)
Screenshot (7)

Originally created by @SekandarPro01 on GitHub (Nov 18, 2019). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/78 ![Screenshot (6)](https://user-images.githubusercontent.com/57907890/69063135-28fed800-0a46-11ea-9bac-21c092166854.png) ![Screenshot (7)](https://user-images.githubusercontent.com/57907890/69063146-2e5c2280-0a46-11ea-90b8-346e98c17001.png)
kerem closed this issue 2026-02-26 12:20:24 +03:00
Author
Owner

@enjoysmath commented on GitHub (Dec 6, 2019):

Pyinstaller doesn't work with 3.8. I'm using PyQt5 / 3.6.5 and it's working.

<!-- gh-comment-id:562731989 --> @enjoysmath commented on GitHub (Dec 6, 2019): Pyinstaller doesn't work with 3.8. I'm using PyQt5 / 3.6.5 and it's working.
Author
Owner

@brentvollebregt commented on GitHub (Dec 7, 2019):

Yes, currently Python 3.8 is not supported as PyInstaller doesn't officially support Python 3.8 yet (on PyPI)

<!-- gh-comment-id:562820834 --> @brentvollebregt commented on GitHub (Dec 7, 2019): Yes, currently Python 3.8 is not supported as PyInstaller doesn't officially support Python 3.8 yet (on PyPI)
Author
Owner

@brentvollebregt commented on GitHub (Dec 7, 2019):

Although I am not sure if this is a Python 3.8 issue as it is occurring when installing Gevent. Have you tried updating setuptools?

<!-- gh-comment-id:562827081 --> @brentvollebregt commented on GitHub (Dec 7, 2019): Although I am not sure if this is a Python 3.8 issue as it is occurring when installing Gevent. Have you tried updating setuptools?
Author
Owner

@ganego commented on GitHub (Jan 28, 2020):

Installing via pip with 3.8 works fine. But you have to install gevent manually in the newest version:
pip install "gevent>=1.5a3".

https://pypi.org/project/gevent/#history

<!-- gh-comment-id:579480768 --> @ganego commented on GitHub (Jan 28, 2020): Installing via pip with 3.8 works fine. But you have to install gevent manually in the newest version: `pip install "gevent>=1.5a3"`. https://pypi.org/project/gevent/#history
Author
Owner

@ScotterMonk commented on GitHub (Jan 31, 2020):

@ganego That worked up until pip got to greenlet and then started erroring. Ideas?

<!-- gh-comment-id:580891580 --> @ScotterMonk commented on GitHub (Jan 31, 2020): @ganego That worked up until pip got to greenlet and then started erroring. Ideas?
Author
Owner

@ganego commented on GitHub (Jan 31, 2020):

@ScotterMonk My Python 3.8 has greenlet 0.4.15 installed. I guess thanks to this program here.
Post an error log.

Though for creating an exe I always get this warning:
470086 WARNING: Unable to find package for requirement greenlet from package gevent.
No idea what it wants, the process then continues and produces a working exe.

<!-- gh-comment-id:580900508 --> @ganego commented on GitHub (Jan 31, 2020): @ScotterMonk My Python 3.8 has `greenlet 0.4.15` installed. I guess thanks to this program here. Post an error log. Though for creating an exe I always get this warning: `470086 WARNING: Unable to find package for requirement greenlet from package gevent.` No idea what it wants, the process then continues and produces a working exe.
Author
Owner

@ScotterMonk commented on GitHub (Jan 31, 2020):

@ganego
C:\Users\scott>pip install greenlet
Collecting greenlet
Using cached greenlet-0.4.15.tar.gz (59 kB)
Installing collected packages: greenlet
Running setup.py install for greenlet ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\scott\AppData\Local\Temp\pip-install-yfyk2pjs\greenlet\setup.py'"'"'; file='"'"'C:\Users\scott\AppData\Local\Temp\pip-install-yfyk2pjs\greenlet\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-wtjgj4cw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet'
cwd: C:\Users\scott\AppData\Local\Temp\pip-install-yfyk2pjs\greenlet
Complete output (5 lines):
running install
running build
running build_ext
building 'greenlet' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\scott\AppData\Local\Temp\pip-install-yfyk2pjs\greenlet\setup.py'"'"'; file='"'"'C:\Users\scott\AppData\Local\Temp\pip-install-yfyk2pjs\greenlet\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-wtjgj4cw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet' Check the logs for full command output.

<!-- gh-comment-id:580903004 --> @ScotterMonk commented on GitHub (Jan 31, 2020): @ganego C:\Users\scott>pip install greenlet Collecting greenlet Using cached greenlet-0.4.15.tar.gz (59 kB) Installing collected packages: greenlet Running setup.py install for greenlet ... error ERROR: Command errored out with exit status 1: command: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-yfyk2pjs\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-yfyk2pjs\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-wtjgj4cw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet' cwd: C:\Users\scott\AppData\Local\Temp\pip-install-yfyk2pjs\greenlet\ Complete output (5 lines): running install running build running build_ext building 'greenlet' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-yfyk2pjs\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-yfyk2pjs\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-wtjgj4cw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet' Check the logs for full command output.
Author
Owner

@ScotterMonk commented on GitHub (Jan 31, 2020):

@ganego OK I've installed MS VC 14.x (latest) and I am getting same error message when I try pip install greenlet. Ideas?

<!-- gh-comment-id:580903202 --> @ScotterMonk commented on GitHub (Jan 31, 2020): @ganego OK I've installed MS VC 14.x (latest) and I am getting same error message when I try pip install greenlet. Ideas?
Author
Owner

@ScotterMonk commented on GitHub (Jan 31, 2020):

Ah. Noticing greenlet install asked for 14.0, so I'm installing that exact version now...

<!-- gh-comment-id:580907933 --> @ScotterMonk commented on GitHub (Jan 31, 2020): Ah. Noticing greenlet install asked for 14.0, so I'm installing that exact version now...
Author
Owner

@ScotterMonk commented on GitHub (Jan 31, 2020):

Tried again after adding VC++14.0.
C:\Users\scott>pip install greenlet
Collecting greenlet
Using cached greenlet-0.4.15.tar.gz (59 kB)
Installing collected packages: greenlet
Running setup.py install for greenlet ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\scott\AppData\Local\Temp\pip-install-oe8ukcs9\greenlet\setup.py'"'"'; file='"'"'C:\Users\scott\AppData\Local\Temp\pip-install-oe8ukcs9\greenlet\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-_vamb05v\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet'
cwd: C:\Users\scott\AppData\Local\Temp\pip-install-oe8ukcs9\greenlet
Complete output (11 lines):
running install
running build
running build_ext
building 'greenlet' extension
creating build
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\scott\appdata\local\programs\python\python38\include -Ic:\users\scott\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcgreenlet.c /Fobuild\temp.win-amd64-3.8\Release\greenlet.obj
greenlet.c
c:\users\scott\appdata\local\programs\python\python38\include\pyconfig.h(206): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\scott\AppData\Local\Temp\pip-install-oe8ukcs9\greenlet\setup.py'"'"'; file='"'"'C:\Users\scott\AppData\Local\Temp\pip-install-oe8ukcs9\greenlet\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-_vamb05v\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet' Check the logs for full command output.

<!-- gh-comment-id:580910879 --> @ScotterMonk commented on GitHub (Jan 31, 2020): Tried again after adding VC++14.0. C:\Users\scott>pip install greenlet Collecting greenlet Using cached greenlet-0.4.15.tar.gz (59 kB) Installing collected packages: greenlet Running setup.py install for greenlet ... error ERROR: Command errored out with exit status 1: command: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-oe8ukcs9\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-oe8ukcs9\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-_vamb05v\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet' cwd: C:\Users\scott\AppData\Local\Temp\pip-install-oe8ukcs9\greenlet\ Complete output (11 lines): running install running build running build_ext building 'greenlet' extension creating build creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\scott\appdata\local\programs\python\python38\include -Ic:\users\scott\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcgreenlet.c /Fobuild\temp.win-amd64-3.8\Release\greenlet.obj greenlet.c c:\users\scott\appdata\local\programs\python\python38\include\pyconfig.h(206): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\scott\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-oe8ukcs9\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\scott\\AppData\\Local\\Temp\\pip-install-oe8ukcs9\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\scott\AppData\Local\Temp\pip-record-_vamb05v\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scott\appdata\local\programs\python\python38\Include\greenlet' Check the logs for full command output.
Author
Owner

@ganego commented on GitHub (Jan 31, 2020):

Cannot open include file: 'basetsd.h': No such file or directory

https://github.com/Azure/azure-iot-sdk-python/issues/82#issuecomment-436792771

<!-- gh-comment-id:580920663 --> @ganego commented on GitHub (Jan 31, 2020): > Cannot open include file: 'basetsd.h': No such file or directory https://github.com/Azure/azure-iot-sdk-python/issues/82#issuecomment-436792771
Author
Owner

@brentvollebregt commented on GitHub (Jan 31, 2020):

If you download a wheel from greenlet on PyPI sometimes they are pre-built so you don't need these extra tools to build it.

<!-- gh-comment-id:580934534 --> @brentvollebregt commented on GitHub (Jan 31, 2020): If you download a wheel from [greenlet on PyPI](https://pypi.org/project/greenlet/0.4.15/#files) sometimes they are pre-built so you don't need these extra tools to build it.
Author
Owner

@ScotterMonk commented on GitHub (Jan 31, 2020):

Cannot open include file: 'basetsd.h': No such file or directory

Azure/azure-iot-sdk-python#82 (comment)

It worked!!!
THANK YOU!

<!-- gh-comment-id:580937880 --> @ScotterMonk commented on GitHub (Jan 31, 2020): > > Cannot open include file: 'basetsd.h': No such file or directory > > [Azure/azure-iot-sdk-python#82 (comment)](https://github.com/Azure/azure-iot-sdk-python/issues/82#issuecomment-436792771) It worked!!! THANK YOU!
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

Got much further along. Ran EXE and it gave an error. Looked at log to see this is the only warning:
392175 WARNING: Unable to find package for requirement greenlet from package gevent.
392175 INFO: Packages required by gevent:
['cffi']
Assuming I need to find and install "cffi", how do I do that?
UPDATE: Looks like I have cffi already.
Ideas?

<!-- gh-comment-id:580965505 --> @ScotterMonk commented on GitHub (Feb 1, 2020): Got much further along. Ran EXE and it gave an error. Looked at log to see this is the only warning: 392175 WARNING: Unable to find package for requirement greenlet from package gevent. 392175 INFO: Packages required by gevent: ['cffi'] Assuming I need to find and install "cffi", how do I do that? UPDATE: Looks like I have cffi already. Ideas?
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

Could this be my problem?

import os
file_path = os.path.dirname(os.path.abspath(__file__))
os.chdir(file_path)

EDIT: Also, I'm using the "arcade" library (based on pyglet).

<!-- gh-comment-id:580965998 --> @ScotterMonk commented on GitHub (Feb 1, 2020): Could this be my problem? ``` import os file_path = os.path.dirname(os.path.abspath(__file__)) os.chdir(file_path) ``` EDIT: Also, I'm using the "arcade" library (based on pyglet).
Author
Owner

@brentvollebregt commented on GitHub (Feb 1, 2020):

You could try adding cffi in --hiden-modules

<!-- gh-comment-id:580984049 --> @brentvollebregt commented on GitHub (Feb 1, 2020): You could try adding `cffi` in --hiden-modules
Author
Owner

@ganego commented on GitHub (Feb 1, 2020):

Could this be my problem?

import os
file_path = os.path.dirname(os.path.abspath(__file__))
os.chdir(file_path)

This could be one of your problems, since it won't work.

if getattr(sys, "frozen", False):
    program_path = sys._MEIPASS
else:
    program_path = os.path.dirname(os.path.abspath(__file__))

I think @brentvollebregt, you should point out this case better on the main page. Right now it's at the bottom in some example where the subject has nothing to do with this problem.

<!-- gh-comment-id:581013352 --> @ganego commented on GitHub (Feb 1, 2020): > > > Could this be my problem? > > ``` > import os > file_path = os.path.dirname(os.path.abspath(__file__)) > os.chdir(file_path) > ``` This could be one of your problems, since it won't work. ``` if getattr(sys, "frozen", False): program_path = sys._MEIPASS else: program_path = os.path.dirname(os.path.abspath(__file__)) ``` I think @brentvollebregt, you should point out this case better on the main page. Right now it's at the bottom in some example where the subject has nothing to do with this problem.
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

@ganego Thank you! That removed an error. The exe creation still has "top level" errors. I've attached the "warn-game-...txt" file to show you these, in case you have ideas.
warn-game-v03.txt

<!-- gh-comment-id:581027801 --> @ScotterMonk commented on GitHub (Feb 1, 2020): @ganego Thank you! That removed an error. The exe creation still has "top level" errors. I've attached the "warn-game-...txt" file to show you these, in case you have ideas. [warn-game-v03.txt](https://github.com/brentvollebregt/auto-py-to-exe/files/4142567/warn-game-v03.txt)
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

Regarding: "missing module named 'win32com.gen_py' - imported by win32com (conditional, optional), C:\Users\scott\AppData\Local\Programs\Python\Python38\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py (top-level)"
I wonder if this merely means I need to add something to my game code like:
"from win32api import gen_py"? If so, what is the syntax? I've been scouring the web finding nothing yet, except people talking about Excel automation but no examples of how to import in Python script.

<!-- gh-comment-id:581029030 --> @ScotterMonk commented on GitHub (Feb 1, 2020): Regarding: "missing module named 'win32com.gen_py' - imported by win32com (conditional, optional), C:\Users\scott\AppData\Local\Programs\Python\Python38\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_win32comgenpy.py (top-level)" I wonder if this merely means I need to add something to my game code like: "from win32api import gen_py"? If so, what is the syntax? I've been scouring the web finding nothing yet, except people talking about Excel automation but no examples of how to import in Python script.
Author
Owner

@ganego commented on GitHub (Feb 1, 2020):

@ScotterMonk Please read this: https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#how-to-fix-specific-issues

<!-- gh-comment-id:581029785 --> @ganego commented on GitHub (Feb 1, 2020): @ScotterMonk Please read this: https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#how-to-fix-specific-issues
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

@ganego Thanks! I DO want to figure this out on my own, yet feel over my head. Read the doc at that URL you just sent and learned a few things. Oh and I figured out how to add:

import win32com
from win32com import gen_py

... which made no difference to the warnings.
From the URL you just sent, I learned the following:
"open the advanced tab and find the --hidden-import input. Simply paste the module name into this input and then repackage"
by putting "win32com.gen_py" in the --hidden-import field in auto-to-exe and the warnings came back exactly the same as the file I attached above. Ideas? FYI: I AM still researching on my own and trying different things but since you know this so well, hoping you see something obvious I'm doing wrong. Oh and in that field, should I add a comma followed by the other "top level" missing modules like "zipimport"? Why would it mark that one as "top level"? And if adding win32com.gen_py didn't fix that issue in warnings, I'm not feeling confident that adding more in that field would help. Ideas?

<!-- gh-comment-id:581031838 --> @ScotterMonk commented on GitHub (Feb 1, 2020): @ganego Thanks! I DO want to figure this out on my own, yet feel over my head. Read the doc at that URL you just sent and learned a few things. Oh and I figured out how to add: ``` import win32com from win32com import gen_py ``` ... which made no difference to the warnings. From the URL you just sent, I learned the following: "open the advanced tab and find the --hidden-import input. Simply paste the module name into this input and then repackage" by putting "win32com.gen_py" in the --hidden-import field in auto-to-exe and the warnings came back exactly the same as the file I attached above. Ideas? FYI: I AM still researching on my own and trying different things but since you know this so well, hoping you see something obvious I'm doing wrong. Oh and in that field, should I add a comma followed by the other "top level" missing modules like "zipimport"? Why would it mark that one as "top level"? And if adding win32com.gen_py didn't fix that issue in warnings, I'm not feeling confident that adding more in that field would help. Ideas?
Author
Owner

@ganego commented on GitHub (Feb 1, 2020):

You don't need that import in your python file.
Adding all missing packages to hidden-import worked for me.
I had to add for example pkg_resources.py2_warn to hidden-import otherwise it won't compile. No idea why, I don't even use that stuff.
Yes, use commas: modA,modB,modC.
I don't really know this well, I just discovered auto-py-to-exe myself some days ago ;)
But I'd think this big text file with all those missing modules shows some more serious problems with the process or your python installation - you are missing basically everything. Not sure if that is normal - but your script/program seems to be somewhat elaborate guessing by all the stuff you import.

<!-- gh-comment-id:581033643 --> @ganego commented on GitHub (Feb 1, 2020): You don't need that import in your python file. Adding all missing packages to `hidden-import` worked for me. I had to add for example `pkg_resources.py2_warn` to `hidden-import ` otherwise it won't compile. No idea why, I don't even use that stuff. Yes, use commas: `modA,modB,modC`. I don't really know this well, I just discovered auto-py-to-exe myself some days ago ;) But I'd think this big text file with all those missing modules shows some more serious problems with the process or your python installation - you are missing basically everything. Not sure if that is normal - but your script/program seems to be somewhat elaborate guessing by all the stuff you import.
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

Thanks! Trying the new stuff you shared.

<!-- gh-comment-id:581035035 --> @ScotterMonk commented on GitHub (Feb 1, 2020): Thanks! Trying the new stuff you shared.
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

@ganego also, if you want to see my source, it is actually only one py file that is not huge. Maybe you will see some basic python error that I'm missing. It is a GUI app (2d game) that runs fine when I hit "run" in Visual Studio Code.

<!-- gh-comment-id:581035150 --> @ScotterMonk commented on GitHub (Feb 1, 2020): @ganego also, if you want to see my source, it is actually only one py file that is not huge. Maybe you will see some basic python error that I'm missing. It is a GUI app (2d game) that runs fine when I hit "run" in Visual Studio Code.
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

Something that is confusing to me. In auto-py-to-exe interface, I added the following to the hidden input in advanced: "pkg_resources.py2_warn, win32com.gen_py, zipimport" AND redid import to get the SAME warning message still listing those as missing. I verified they are installed in packages area of Python38 folder, so I'm confused.

<!-- gh-comment-id:581036173 --> @ScotterMonk commented on GitHub (Feb 1, 2020): Something that is confusing to me. In auto-py-to-exe interface, I added the following to the hidden input in advanced: "pkg_resources.py2_warn, win32com.gen_py, zipimport" AND redid import to get the SAME warning message still listing those as missing. I verified they are installed in packages area of Python38 folder, so I'm confused.
Author
Owner

@ScotterMonk commented on GitHub (Feb 1, 2020):

If the warning says "missing module named resource - imported by posix (top-level), test.support (optional)" does that mean add to hidden input list "posix" and/or "resource"?

<!-- gh-comment-id:581037440 --> @ScotterMonk commented on GitHub (Feb 1, 2020): If the warning says "missing module named resource - imported by posix (top-level), test.support (optional)" does that mean add to hidden input list "posix" and/or "resource"?
Author
Owner

@brentvollebregt commented on GitHub (Feb 3, 2020):

If you package to one folder (not one file), you can explore the output using a file viewer. Have a look if the modules that are being reported are missing are in the package - they may be in a zip.

<!-- gh-comment-id:581237544 --> @brentvollebregt commented on GitHub (Feb 3, 2020): If you package to one folder (not one file), you can explore the output using a file viewer. Have a look if the modules that are being reported are missing are in the package - they may be in a zip.
Author
Owner

@hgdagon commented on GitHub (Apr 5, 2020):

I had this issue on msys2. Fixed by installing cffi beforehand.

<!-- gh-comment-id:609369524 --> @hgdagon commented on GitHub (Apr 5, 2020): I had this issue on msys2. Fixed by installing cffi beforehand.
Author
Owner

@brentvollebregt commented on GitHub (Apr 5, 2020):

This issue got a bit off-topic which I am fine with but it has moved far away from the original issue. As @SekandarPro01 has not replied at all, I will close the issue.

<!-- gh-comment-id:609391337 --> @brentvollebregt commented on GitHub (Apr 5, 2020): This issue got a bit off-topic which I am fine with but it has moved far away from the original issue. As @SekandarPro01 has not replied at all, I will close the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#77
No description provided.