PyInstaller无法从内置导入

时间:2019-08-05 15:33:31

标签: pyinstaller

我只是在win 10下执行了PyInstaller inuithread.py,并在生成的dist目录中获得了可执行文件。但是,在运行它时,出现以下错误。 Python是3.7.3,PyInstaller是3.4,知道如何解决这个问题吗?

    (env-pyside2) C:\Users\Michael Chen\Desktop\AIMML\IDE\3rd\pyqtconsole-1.1.3\pyqtconsole-1.1.3\examples\dist\inuithread>inuithread.exe
Traceback (most recent call last):
  File "inuithread.py", line 8, in <module>
  File "C:\ProgramData\Miniconda3\envs\env-pyside2\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "pyqtconsole\console.py", line 9, in <module>
  File "C:\ProgramData\Miniconda3\envs\env-pyside2\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "pyqtconsole\interpreter.py", line 11, in <module>
ImportError: cannot import name 'exit' from 'builtins' (unknown location)
[19116] Failed to execute script inuithread

(env-pyside2) C:\Users\Michael Chen\Desktop\AIMML\IDE\3rd\pyqtconsole-1.1.3\pyqtconsole-1.1.3\examples\dist\inuithread>python --version
Python 3.7.3

(env-pyside2) C:\Users\Michael Chen\Desktop\AIMML\IDE\3rd\pyqtconsole-1.1.3\pyqtconsole-1.1.3\examples\dist\inuithread>pyinstaller --version
3.4

0 个答案:

没有答案