天天看点

pyinstaller 打包exe 问题解决

Traceback (most recent call last):

  File "C:\Users\qiyong.GWMFC\venv\Scripts\pyinstaller-script.py", line 11, in <module>

    load_entry_point('PyInstaller==3.4', 'console_scripts', 'pyinstaller')()

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\__main__.py", line 111, in run

    run_build(pyi_config, spec_file, **vars(args))

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build

    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main

    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build

    exec(text, spec_namespace)

  File "<string>", line 32, in <module>

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\building\api.py", line 424, in __init__

    strip_binaries=self.strip, upx_binaries=self.upx,

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\building\api.py", line 196, in __init__

    self.__postinit__()

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__

    self.assemble()

  File "C:\Users\qiyong.GWMFC\venv\lib\site-packages\PyInstaller\building\api.py", line 273, in assemble

    pylib_name = os.path.basename(bindepend.get_python_library_path())

  File "C:\Users\qiyong.GWMFC\AppData\Local\Programs\Python\Python37-32\lib\ntpath.py", line 214, in basename

    return split(p)[1]

  File "C:\Users\qiyong.GWMFC\AppData\Local\Programs\Python\Python37-32\lib\ntpath.py", line 183, in split

    p = os.fspath(p)

TypeError: expected str, bytes or os.PathLike object, not NoneType

以上问题 下载解压文件 PyInstaller\depend\bindepend.py   替换系统中  xxx\venv\Lib\site-packages\PyInstaller\depend\bindepend.py文件  下载地址 https://download.csdn.net/download/yongyong169/11081381