pyinstaller无法正确导入模块

时间:2020-08-13 21:51:42

标签: python pyinstaller

我尝试使用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")``

0 个答案:

没有答案