mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-26 20:25:50 +03:00
[GH-ISSUE #78] Cannot install Py-to-Exe #77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SekandarPro01 on GitHub (Nov 18, 2019).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/78
@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.
@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)
@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?
@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
@ScotterMonk commented on GitHub (Jan 31, 2020):
@ganego That worked up until pip got to greenlet and then started erroring. Ideas?
@ganego commented on GitHub (Jan 31, 2020):
@ScotterMonk My Python 3.8 has
greenlet 0.4.15installed. 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.
@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.
@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?
@ScotterMonk commented on GitHub (Jan 31, 2020):
Ah. Noticing greenlet install asked for 14.0, so I'm installing that exact version now...
@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.
@ganego commented on GitHub (Jan 31, 2020):
https://github.com/Azure/azure-iot-sdk-python/issues/82#issuecomment-436792771
@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.
@ScotterMonk commented on GitHub (Jan 31, 2020):
It worked!!!
THANK YOU!
@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?
@ScotterMonk commented on GitHub (Feb 1, 2020):
Could this be my problem?
EDIT: Also, I'm using the "arcade" library (based on pyglet).
@brentvollebregt commented on GitHub (Feb 1, 2020):
You could try adding
cffiin --hiden-modules@ganego commented on GitHub (Feb 1, 2020):
This could be one of your problems, since it won't work.
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.
@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
@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.
@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
@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:
... 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?
@ganego commented on GitHub (Feb 1, 2020):
You don't need that import in your python file.
Adding all missing packages to
hidden-importworked for me.I had to add for example
pkg_resources.py2_warntohidden-importotherwise 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.
@ScotterMonk commented on GitHub (Feb 1, 2020):
Thanks! Trying the new stuff you shared.
@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.
@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.
@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"?
@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.
@hgdagon commented on GitHub (Apr 5, 2020):
I had this issue on msys2. Fixed by installing cffi beforehand.
@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.