@lightmanLP
Душу питона

Ошибка при компиляции pyinstaller?

Как это исправить?
125 INFO: PyInstaller: 3.5
126 INFO: Python: 3.7.4
126 INFO: Platform: Windows-8.1-6.3.9600-SP0
128 INFO: wrote C:\Users\Максим\Desktop\xxxapp.spec
140 INFO: UPX is not available.
141 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Максим\\Desktop', 'C:\\Users\\Максим\\Desktop']
142 INFO: checking Analysis
142 INFO: Building Analysis because Analysis-00.toc is non existent
142 INFO: Initializing module dependency graph...
146 INFO: Initializing module graph hooks...
150 INFO: Analyzing base_library.zip ...
5315 INFO: running Analysis Analysis-00.toc
5318 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by d:\program files (x86)\python37-32\python.exe
5687 INFO: Caching module hooks...
5698 INFO: Analyzing C:\Users\Максим\Desktop\xxxapp.py
6368 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
9078 INFO: Processing pre-find module path hook   distutils
11438 INFO: Processing pre-find module path hook   site
11440 INFO: site: retargeting to fake-dir 'C:\\Users\\Максим\\AppData\\Roaming\\Python\\Python37\\site-packages\\PyInstaller\\fake-modules'
13260 INFO: Processing pre-safe import module hook   setuptools.extern.six.moves
17811 INFO: Loading module hooks...
17812 INFO: Loading module hook "hook-certifi.py"...
17820 INFO: Loading module hook "hook-distutils.py"...
17823 INFO: Loading module hook "hook-encodings.py"...
17960 INFO: Loading module hook "hook-lib2to3.py"...
17966 INFO: Loading module hook "hook-numpy.core.py"...
Traceback (most recent call last):
  File "d:\program files (x86)\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\program files (x86)\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "C:\Users\Максим\Desktop\xxxapp.spec", line 17, in <module>
    noarchive=False)
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py", line 243, in __init__
    self.__postinit__()
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py", line 502, in assemble
    module_hook.post_graph()
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\imphook.py", line 410, in post_graph
    self._load_hook_module()
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\imphook.py", line 377, in _load_hook_module
    self.hook_module_name, self.hook_filename)
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\compat.py", line 793, in importlib_load_source
    return mod_loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 407, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 907, in load_module
  File "<frozen importlib._bootstrap_external>", line 732, in load_module
  File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\hooks\hook-numpy.core.py", line 27, in <module>
    pkg_base, pkg_dir = get_package_paths('numpy.core')
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\utils\hooks\__init__.py", line 535, in get_package_paths
    file_attr = get_module_file_attribute(package)
  File "C:\Users\Максим\AppData\Roaming\Python\Python37\site-packages\PyInstaller\utils\hooks\__init__.py", line 318, in get_module_file_attribute
    loader = pkgutil.find_loader(package)
  File "d:\program files (x86)\python37-32\lib\pkgutil.py", line 493, in find_loader
    spec = importlib.util.find_spec(fullname)
  File "d:\program files (x86)\python37-32\lib\importlib\util.py", line 94, in find_spec
    parent = __import__(parent_name, fromlist=['__path__'])
  File "d:\program files (x86)\python37-32\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "d:\program files (x86)\python37-32\lib\site-packages\numpy\core\__init__.py", line 23, in <module>
    WinDLL(os.path.abspath(filename))
  File "d:\program files (x86)\python37-32\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 не является приложением Win32
  • Вопрос задан
  • 54 просмотра
Решения вопроса 1
kgb_zor
@kgb_zor
Мне нужен твой traceback.
1. В пути не должно быть кириллицы.
2. Покажите исходники программы.
Если она под грифом секретно, то вот тыц
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы