我尝试使用pyinstaller从Python制作一些GUI。导入名为cvb
Traceback (most recent call last):
File "button5.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\users\User\appdata\local\conda\conda\envs\py36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\cvb\__init__.py", line 20, in <module>
StopIteration
[10276] Failed to execute script button5
cvb\__init__.py", line 20
包含以下代码:
site_packages = next(p for p in _sys.path if 'site-packages' in p)
importpath = _os.path.join(site_packages,"cvb")``