OSError: [WinError 1] Incorrect function

Viewed 190

help me, i can't use pyinstaller with matplotlib ,image

  File "quanlysinhvien.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "matplotlib\__init__.py", line 890, in <module>
  File "matplotlib\__init__.py", line 567, in matplotlib_fname
  File "matplotlib\__init__.py", line 564, in gen_candidates
  File "matplotlib\__init__.py", line 273, in wrapper
  File "matplotlib\__init__.py", line 510, in get_configdir
  File "matplotlib\__init__.py", line 465, in _get_config_or_cache_dir
  File "pathlib.py", line 1161, in resolve
  File "pathlib.py", line 205, in resolve
OSError: [WinError 1] Incorrect function: 'R:\\tmp097e8jcr'

and here is my spec file

block_cipher = None
a = Analysis(
    ['quanlysinhvien.py'],
    pathex=[],
    binaries=[],
    datas=[],
    hiddenimports=['sklearn.utils._typedefs'],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=None,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=None)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='quanlysinhvien',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon='quanlysinhvien.ico',
)

i also use sklearn for my application and it doesn't give any error until i add matplotlib, and here is my import I have tried all the methods I know but still no success, please help me

0 Answers
Related