Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'struct' from 'lib' (unknown location) #25

Open
futureflsl opened this issue Aug 11, 2021 · 0 comments
Open

Comments

@futureflsl
Copy link

I use pyinstaller https://github.com/cgvict/roLabelImg

environment:
windows10
anaconda3+python3.8
pyinstaller==4.5

compile process:

(base) C:\Users\Administrator\Desktop\roLabelImg-master>pyinstaller roLabelImg.spec
1619 INFO: PyInstaller: 4.5
1619 INFO: Python: 3.8.5 (conda)
1621 INFO: Platform: Windows-10-10.0.19041-SP0
1629 INFO: UPX is not available.
1631 INFO: Extending PYTHONPATH with paths
['C:\Users\Administrator\Desktop',
'E:\anaconda3\Lib\site-packages\PyQt5\Qt\bin',
'C:\Users\Administrator\Desktop\roLabelImg-master',
'E:\x07naconda3\Lib']
2719 INFO: checking Analysis
2719 INFO: Building Analysis because Analysis-00.toc is non existent
2720 INFO: Initializing module dependency graph...
2732 INFO: Caching module graph hooks...
2758 INFO: Analyzing base_library.zip ...
9456 INFO: Processing pre-find module path hook distutils from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
9457 INFO: distutils: retargeting to non-venv dir 'e:\anaconda3\lib'
14886 INFO: Caching module dependency graph...
15438 INFO: running Analysis Analysis-00.toc
15457 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by e:\anaconda3\python.exe
15766 INFO: Analyzing roLabelImg.py
16244 INFO: Processing module hooks...
16245 INFO: Loading module hook 'hook-difflib.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16249 INFO: Loading module hook 'hook-distutils.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16250 INFO: Loading module hook 'hook-distutils.util.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16253 INFO: Loading module hook 'hook-encodings.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16380 INFO: Loading module hook 'hook-heapq.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16383 INFO: Loading module hook 'hook-lib2to3.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16457 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16459 INFO: Loading module hook 'hook-pickle.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
16461 INFO: Loading module hook 'hook-PyQt5.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
17188 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
17374 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
17783 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
18190 INFO: Loading module hook 'hook-sysconfig.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
18191 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
18193 INFO: Loading module hook 'hook-xml.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
18536 INFO: Loading module hook 'hook-_tkinter.py' from 'e:\anaconda3\lib\site-packages\PyInstaller\hooks'...
18743 INFO: checking Tree
18743 INFO: Building Tree because Tree-00.toc is non existent
18747 INFO: Building Tree Tree-00.toc
18914 INFO: checking Tree
18915 INFO: Building Tree because Tree-01.toc is non existent
18915 INFO: Building Tree Tree-01.toc
19053 INFO: checking Tree
19053 INFO: Building Tree because Tree-02.toc is non existent
19054 INFO: Building Tree Tree-02.toc
19078 INFO: Looking for ctypes DLLs
19130 INFO: Analyzing run-time hooks ...
19135 INFO: Including run-time hook 'e:\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py'
19140 INFO: Including run-time hook 'e:\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
19145 INFO: Including run-time hook 'e:\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32api.py'
19165 INFO: Including run-time hook 'e:\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_inspect.py'
19169 INFO: Including run-time hook 'e:\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pyqt5.py'
19178 INFO: Looking for dynamic libraries
20427 INFO: Looking for eggs
20428 INFO: Using Python library e:\anaconda3\python38.dll
20429 INFO: Found binding redirects:
[]
20437 INFO: Warnings written to C:\Users\Administrator\Desktop\roLabelImg-master\build\roLabelImg\warn-roLabelImg.txt
20507 INFO: Graph cross-reference written to C:\Users\Administrator\Desktop\roLabelImg-master\build\roLabelImg\xref-roLabelImg.html
20521 INFO: checking PYZ
20521 INFO: Building PYZ because PYZ-00.toc is non existent
20521 INFO: Building PYZ (ZlibArchive) C:\Users\Administrator\Desktop\roLabelImg-master\build\roLabelImg\PYZ-00.pyz
21434 INFO: Building PYZ (ZlibArchive) C:\Users\Administrator\Desktop\roLabelImg-master\build\roLabelImg\PYZ-00.pyz completed successfully.
21447 INFO: checking PKG
21447 INFO: Building PKG because PKG-00.toc is non existent
21447 INFO: Building PKG (CArchive) PKG-00.pkg
21499 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
21501 INFO: Bootloader e:\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
21501 INFO: checking EXE
21504 INFO: Building EXE because EXE-00.toc is non existent
21504 INFO: Building EXE from EXE-00.toc
21507 INFO: Copying icons from ['e:\anaconda3\lib\site-packages\PyInstaller\bootloader\images\icon-windowed.ico']
21509 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
21510 INFO: Writing RT_ICON 1 resource with 3752 bytes
21510 INFO: Writing RT_ICON 2 resource with 2216 bytes
21511 INFO: Writing RT_ICON 3 resource with 1384 bytes
21512 INFO: Writing RT_ICON 4 resource with 38188 bytes
21512 INFO: Writing RT_ICON 5 resource with 9640 bytes
21513 INFO: Writing RT_ICON 6 resource with 4264 bytes
21513 INFO: Writing RT_ICON 7 resource with 1128 bytes
21644 INFO: Appending archive to EXE C:\Users\Administrator\Desktop\roLabelImg-master\build\roLabelImg\roLabelImg.exe
23046 INFO: Building EXE from EXE-00.toc completed successfully.
23049 INFO: checking COLLECT
23049 INFO: Building COLLECT because COLLECT-00.toc is non existent
23051 INFO: Building COLLECT COLLECT-00.toc
25851 INFO: Building COLLECT COLLECT-00.toc completed successfully.

when I run exe.error occured

Traceback (most recent call last):
File "roLabelImg.py", line 32, in
ImportError: cannot import name 'struct' from 'lib' (unknown location)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant