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

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

Platform and which version I’m working on:
Description: Ubuntu 16.04.4 LTS
Release: 16.04 (xenial)

[...]
58477 INFO: Loading module hook "hook-gevent.monkey.py"...
58612 INFO: Looking for ctypes DLLs
58982 WARNING: library user32 required via ctypes not found
59330 INFO: Analyzing run-time hooks ...
59365 INFO: Including run-time hook 'pyi_rth__tkinter.py'
59367 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
59370 INFO: Including run-time hook 'pyi_rth_pkgres.py'
59371 INFO: Including run-time hook 'pyi_rth_traitlets.py'
59372 INFO: Including run-time hook 'pyi_rth_qt5.py'
59373 INFO: Including run-time hook 'pyi_rth_mplconfig.py'
59374 INFO: Including run-time hook 'pyi_rth_mpldata.py'
59437 INFO: Looking for dynamic libraries
63980 INFO: Looking for eggs
63980 INFO: Using Python library ~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/scipy/linalg/../../../../libpython3.6m.so.1.0
64015 INFO: Warnings written to ~/build/__init__/warn__init__.txt
64298 INFO: Graph cross-reference written to ~/build/__init__/xref-__init__.html
64447 INFO: checking PYZ
64447 INFO: Building PYZ because out00-PYZ.toc is non existent
64447 INFO: Building PYZ (ZlibArchive) ~/build/__init__/out00-PYZ.pyz
67927 INFO: Building PYZ (ZlibArchive) ~/build/__init__/out00-PYZ.pyz completed successfully.
68011 INFO: checking PKG
68011 INFO: Building PKG because out00-PKG.toc is non existent
68011 INFO: Building PKG (CArchive) out00-PKG.pkg
Traceback (most recent call last):
  File "~/Softwares/anaconda3/5.0.0/bin/pyinstaller", line 11, in 
    load_entry_point('PyInstaller==3.4.dev0+2611919ba', 'console_scripts', 'pyinstaller')()
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/__main__.py", line 94, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/__main__.py", line 46, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 791, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 737, in build
    exec(text, spec_namespace)
  File "", line 26, in 
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/building/api.py", line 411, in __init__
    strip_binaries=self.strip, upx_binaries=self.upx,
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/building/api.py", line 196, in __init__
    self.__postinit__()
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 161, in __postinit__
    self.assemble()
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/site-packages/PyInstaller/building/api.py", line 273, in assemble
    pylib_name = os.path.basename(bindepend.get_python_library_path())
  File "~/Softwares/anaconda3/5.0.0/lib/python3.6/posixpath.py", line 144, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

解决办法:
TypeError: expected str, bytes or os.PathLike object, not NoneType_第1张图片

LD_LIBRARY_PATH=${CONDA_PREFIX}/lib pyinstaller

你可能感兴趣的:(TypeError: expected str, bytes or os.PathLike object, not NoneType)