Pyinstaller无法制作exe文件

时间:2019-04-28 13:22:04

标签: python-3.x pyinstaller

Python [3.7.3]

所以我也试图从python生成一个executeble文件。我已经尝试了很多次,我迷路了。我已经检查了网站上的其他问题,但无法使其正常工作。如果有人可以帮助我解决这个问题,我将非常高兴。

D:\Dokumenter\Skript\Python\Ferdig\Skri>pyinstaller --onefile -w BackupTo.py
153 INFO: PyInstaller: 3.3.1
154 INFO: Python: 3.7.3
154 INFO: Platform: Windows-10-10.0.17763-SP0
157 INFO: wrote D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.spec
158 INFO: UPX is not available.
159 INFO: Extending PYTHONPATH with paths
['D:\\Dokumenter\\Skript\\Python\\Ferdig\\Skri',
 'D:\\Dokumenter\\Skript\\Python\\Ferdig\\Skri']
159 INFO: checking Analysis
237 INFO: checking PYZ
250 INFO: checking PKG
250 INFO: Building PKG because out00-PKG.toc is non existent
251 INFO: Building PKG (CArchive) out00-PKG.pkg
Traceback (most recent call last):
  File "D:\Dokumenter\Skript\Python\venv\Scripts\pyinstaller-script.py", line 11, in <module>
    load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\__main__.py", line 94, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build
    exec(text, spec_namespace)
  File "<string>", line 29, in <module>
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\building\api.py", line 411, in __init__
    strip_binaries=self.strip, upx_binaries=self.upx,
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\building\api.py", line 196, in __init__
    self.__postinit__()
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
    self.assemble()
  File "d:\dokumenter\skript\python\venv\lib\site-packages\PyInstaller\building\api.py", line 273, in assemble
    pylib_name = os.path.basename(bindepend.get_python_library_path())
  File "D:\Programmer\Python\lib\ntpath.py", line 214, in basename
    return split(p)[1]
  File "D:\Programmer\Python\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

我也以文字形式收到此警告。

missing module named resource - imported by posix, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named posix - imported by os, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named _posixsubprocess - imported by subprocess, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named org - imported by copy, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named 'org.python' - imported by pickle, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py, xml.sax
missing module named readline - imported by cmd, code, pdb, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
excluded module named _frozen_importlib - imported by importlib, importlib.abc, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named _frozen_importlib_external - imported by importlib._bootstrap, importlib, importlib.abc, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named _winreg - imported by platform, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named _scproxy - imported by urllib.request
missing module named java - imported by platform, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named 'java.lang' - imported by platform, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py, xml.sax._exceptions
missing module named vms_lib - imported by platform, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named termios - imported by tty, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py, getpass
missing module named grp - imported by shutil, tarfile, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py
missing module named pwd - imported by posixpath, shutil, tarfile, http.server, webbrowser, D:\Dokumenter\Skript\Python\Ferdig\Skri\BackupTo.py, netrc, getpass
missing module named ScrolledText - imported by PySimpleGUI.PySimpleGUI
missing module named tkFont - imported by PySimpleGUI.PySimpleGUI
missing module named tkColorChooser - imported by PySimpleGUI.PySimpleGUI
missing module named ttk - imported by PySimpleGUI.PySimpleGUI
missing module named tkFileDialog - imported by PySimpleGUI.PySimpleGUI
missing module named Tkinter - imported by PySimpleGUI.PySimpleGUI

1 个答案:

答案 0 :(得分:0)

我通过使用旧版本的Python使其正常工作