miniaudio(和其他模块)- 无法创建 exe
miniaudio (and other modules) - can't create exe
我只有一行代码,我正在尝试用 pyinstaller 命令生成 exe。
import miniaudio
命令=pyinstaller <filename>.py
输出:
116 INFO: PyInstaller: 4.2
116 INFO: Python: 3.9.2
117 INFO: Platform: Windows-10-10.0.19041-SP0
118 INFO: wrote C:\Users\Χρήστος\Desktop\radio\peradio2.spec
121 INFO: UPX is not available.
122 INFO: Extending PYTHONPATH with paths
['C:\Users\Χρήστος\Desktop\radio', 'C:\Users\Χρήστος\Desktop\radio']
135 INFO: checking Analysis
138 INFO: Building because C:\Users\Χρήστος\Desktop\radio\peradio2.py changed
138 INFO: Initializing module dependency graph...
141 INFO: Caching module graph hooks...
148 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
152 INFO: Analyzing base_library.zip ...
2350 INFO: Processing pre-find module path hook distutils from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
2351 INFO: distutils: retargeting to non-venv dir 'c:\python\lib'
5208 INFO: Caching module dependency graph...
5297 INFO: running Analysis Analysis-00.toc
5314 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python.exe
5389 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\python\python39.dll
5564 INFO: Analyzing C:\Users\Χρήστος\Desktop\radio\peradio2.py
5566 INFO: Processing module hooks...
5567 INFO: Loading module hook 'hook-difflib.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5569 INFO: Excluding import of doctest from module difflib
5569 INFO: Loading module hook 'hook-distutils.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5570 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5572 INFO: Excluding import of lib2to3.refactor from module distutils.util
5572 INFO: Loading module hook 'hook-encodings.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5642 INFO: Loading module hook 'hook-heapq.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5643 INFO: Excluding import of doctest from module heapq
5644 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5697 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5699 INFO: Excluding import of test from module multiprocessing.util
5699 INFO: Excluding import of test.support from module multiprocessing.util
5700 INFO: Loading module hook 'hook-pickle.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5701 INFO: Excluding import of argparse from module pickle
5701 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5702 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5703 INFO: Loading module hook 'hook-xml.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5760 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5896 INFO: checking Tree
5959 INFO: checking Tree
6148 INFO: checking Tree
6165 INFO: Looking for ctypes DLLs
6188 INFO: Analyzing run-time hooks ...
6191 INFO: Including run-time hook 'c:\python\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
6196 INFO: Looking for dynamic libraries
6320 INFO: Looking for eggs
6321 INFO: Using Python library c:\python\python39.dll
6321 INFO: Found binding redirects:
[]
6325 INFO: Warnings written to C:\Users\Χρήστος\Desktop\radio\build\peradio2\warn-peradio2.txt
6359 INFO: Graph cross-reference written to C:\Users\Χρήστος\Desktop\radio\build\peradio2\xref-peradio2.html
6366 INFO: checking PYZ
6375 INFO: Building because toc changed
6375 INFO: Building PYZ (ZlibArchive) C:\Users\Χρήστος\Desktop\radio\build\peradio2\PYZ-00.pyz
6905 INFO: Building PYZ (ZlibArchive) C:\Users\Χρήστος\Desktop\radio\build\peradio2\PYZ-00.pyz completed successfully.
6912 INFO: checking PKG
6920 INFO: Building because toc changed
6920 INFO: Building PKG (CArchive) PKG-00.pkg
6940 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
6941 INFO: Bootloader c:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
6942 INFO: checking EXE
6951 INFO: Rebuilding EXE-00.toc because peradio2.exe missing
6952 INFO: Building EXE from EXE-00.toc
7007 INFO: Copying icons from ['c:\python\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
7071 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
7071 INFO: Writing RT_ICON 1 resource with 3752 bytes
7072 INFO: Writing RT_ICON 2 resource with 2216 bytes
7073 INFO: Writing RT_ICON 3 resource with 1384 bytes
7073 INFO: Writing RT_ICON 4 resource with 37019 bytes
7073 INFO: Writing RT_ICON 5 resource with 9640 bytes
7074 INFO: Writing RT_ICON 6 resource with 4264 bytes
7074 INFO: Writing RT_ICON 7 resource with 1128 bytes
7103 INFO: Appending archive to EXE C:\Users\Χρήστος\Desktop\radio\build\peradio2\peradio2.exe
7261 INFO: Building EXE from EXE-00.toc completed successfully.
7264 INFO: checking COLLECT
7264 INFO: Building COLLECT because COLLECT-00.toc is non existent
7265 INFO: Building COLLECT COLLECT-00.toc
7570 INFO: Building COLLECT COLLECT-00.toc completed successfully.
C:\Users\Χρήστος\Desktop\radio>pyinstaller --hidden-import=miniaudio peradio2.py
118 INFO: PyInstaller: 4.2
119 INFO: Python: 3.9.2
120 INFO: Platform: Windows-10-10.0.19041-SP0
121 INFO: wrote C:\Users\Χρήστος\Desktop\radio\peradio2.spec
123 INFO: UPX is not available.
130 INFO: Extending PYTHONPATH with paths
['C:\Users\Χρήστος\Desktop\radio', 'C:\Users\Χρήστος\Desktop\radio']
144 INFO: checking Analysis
154 INFO: Building because hiddenimports changed
155 INFO: Initializing module dependency graph...
158 INFO: Caching module graph hooks...
165 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
169 INFO: Analyzing base_library.zip ...
2849 INFO: Processing pre-find module path hook distutils from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
2849 INFO: distutils: retargeting to non-venv dir 'c:\python\lib'
4998 INFO: Caching module dependency graph...
5090 INFO: running Analysis Analysis-00.toc
5103 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python.exe
5161 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\python\python39.dll
5373 INFO: Analyzing C:\Users\Χρήστος\Desktop\radio\peradio2.py
6202 INFO: Processing pre-find module path hook site from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-site.py'.
6203 INFO: site: retargeting to fake-dir 'c:\python\lib\site-packages\PyInstaller\fake-modules'
8558 INFO: Processing pre-safe import module hook six.moves from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'.
11175 INFO: Processing module hooks...
11175 INFO: Loading module hook 'hook-pycparser.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
11177 INFO: Loading module hook 'hook-pytest.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec_namespace)
File "C:\Users\Χρήστος\Desktop\radio\peradio2.spec", line 6, in <module>
a = Analysis(['peradio2.py'],
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 242, in __init__
self.__postinit__()
File "c:\python\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 420, in assemble
self.graph.process_post_graph_hooks()
File "c:\python\lib\site-packages\PyInstaller\depend\analysis.py", line 367, in process_post_graph_hooks
module_hook.post_graph()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 447, in post_graph
self._load_hook_module()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 408, in _load_hook_module
self._hook_module = importlib_load_source(
File "c:\python\lib\site-packages\PyInstaller\compat.py", line 598, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 969, in load_module
File "<frozen importlib._bootstrap_external>", line 794, in load_module
File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-pytest.py", line 18, in <module>
import pytest
File "c:\python\lib\site-packages\pytest.py", line 8, in <module>
from _pytest.assertion import register_assert_rewrite
File "c:\python\lib\site-packages\_pytest\assertion\__init__.py", line 13, in <module>
from _pytest.assertion import rewrite
File "c:\python\lib\site-packages\_pytest\assertion\rewrite.py", line 24, in <module>
from _pytest.assertion import util
File "c:\python\lib\site-packages\_pytest\assertion\util.py", line 11, in <module>
import _pytest._code
File "c:\python\lib\site-packages\_pytest\_code\__init__.py", line 7, in <module>
from .code import Code # noqa
File "c:\python\lib\site-packages\_pytest\_code\code.py", line 15, in <module>
import pluggy
File "c:\python\lib\site-packages\pluggy\__init__.py", line 16, in <module>
from .manager import PluginManager, PluginValidationError
File "c:\python\lib\site-packages\pluggy\manager.py", line 6, in <module>
import importlib_metadata
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 471, in <module>
__version__ = version(__name__)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 438, in version
return distribution(package).version
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 411, in distribution
return Distribution.from_name(package)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 179, in from_name
dists = resolver(name)
File "<frozen importlib._bootstrap_external>", line 1389, in find_distributions
File "c:\python\lib\importlib\metadata.py", line 487, in find_distributions
found = cls._search_paths(context.name, context.path)
AttributeError: 'str' object has no attribute 'name'
C:\Users\Χρήστος\Desktop\radio>pyinstaller peradio2.py
118 INFO: PyInstaller: 4.2
118 INFO: Python: 3.9.2
119 INFO: Platform: Windows-10-10.0.19041-SP0
120 INFO: wrote C:\Users\Χρήστος\Desktop\radio\peradio2.spec
123 INFO: UPX is not available.
125 INFO: Extending PYTHONPATH with paths
['C:\Users\Χρήστος\Desktop\radio', 'C:\Users\Χρήστος\Desktop\radio']
138 INFO: checking Analysis
141 INFO: Building because C:\Users\Χρήστος\Desktop\radio\peradio2.py changed
141 INFO: Initializing module dependency graph...
144 INFO: Caching module graph hooks...
151 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
155 INFO: Analyzing base_library.zip ...
2197 INFO: Processing pre-find module path hook distutils from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
2197 INFO: distutils: retargeting to non-venv dir 'c:\python\lib'
5129 INFO: Caching module dependency graph...
5250 INFO: running Analysis Analysis-00.toc
5267 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python.exe
5342 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\python\python39.dll
5538 INFO: Analyzing C:\Users\Χρήστος\Desktop\radio\peradio2.py
6348 INFO: Processing pre-find module path hook site from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-site.py'.
6351 INFO: site: retargeting to fake-dir 'c:\python\lib\site-packages\PyInstaller\fake-modules'
8738 INFO: Processing pre-safe import module hook six.moves from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'.
11357 INFO: Processing module hooks...
11357 INFO: Loading module hook 'hook-pycparser.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
11359 INFO: Loading module hook 'hook-pytest.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec_namespace)
File "C:\Users\Χρήστος\Desktop\radio\peradio2.spec", line 6, in <module>
a = Analysis(['peradio2.py'],
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 242, in __init__
self.__postinit__()
File "c:\python\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 420, in assemble
self.graph.process_post_graph_hooks()
File "c:\python\lib\site-packages\PyInstaller\depend\analysis.py", line 367, in process_post_graph_hooks
module_hook.post_graph()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 447, in post_graph
self._load_hook_module()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 408, in _load_hook_module
self._hook_module = importlib_load_source(
File "c:\python\lib\site-packages\PyInstaller\compat.py", line 598, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 969, in load_module
File "<frozen importlib._bootstrap_external>", line 794, in load_module
File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-pytest.py", line 18, in <module>
import pytest
File "c:\python\lib\site-packages\pytest.py", line 8, in <module>
from _pytest.assertion import register_assert_rewrite
File "c:\python\lib\site-packages\_pytest\assertion\__init__.py", line 13, in <module>
from _pytest.assertion import rewrite
File "c:\python\lib\site-packages\_pytest\assertion\rewrite.py", line 24, in <module>
from _pytest.assertion import util
File "c:\python\lib\site-packages\_pytest\assertion\util.py", line 11, in <module>
import _pytest._code
File "c:\python\lib\site-packages\_pytest\_code\__init__.py", line 7, in <module>
from .code import Code # noqa
File "c:\python\lib\site-packages\_pytest\_code\code.py", line 15, in <module>
import pluggy
File "c:\python\lib\site-packages\pluggy\__init__.py", line 16, in <module>
from .manager import PluginManager, PluginValidationError
File "c:\python\lib\site-packages\pluggy\manager.py", line 6, in <module>
import importlib_metadata
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 471, in <module>
__version__ = version(__name__)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 438, in version
return distribution(package).version
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 411, in distribution
return Distribution.from_name(package)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 179, in from_name
dists = resolver(name)
File "<frozen importlib._bootstrap_external>", line 1389, in find_distributions
File "c:\python\lib\importlib\metadata.py", line 487, in find_distributions
found = cls._search_paths(context.name, context.path)
AttributeError: 'str' object has no attribute 'name'
我尝试卸载并重新安装 pyinstall 6 enum34 和 setuptools,但错误并没有消失。
第一次使用miniaudio模块。
谁能帮我一下?
提前致谢,
克里斯·帕帕斯
**编辑:**我发现这不是唯一关于该问题的模块。
pip uninstall importlib-metadata
pip install importlib-metadata
修正错误!!!
我有这个模块的一个非常旧的版本 0.x。现在 3.x
我只有一行代码,我正在尝试用 pyinstaller 命令生成 exe。
import miniaudio
命令=pyinstaller <filename>.py
输出:
116 INFO: PyInstaller: 4.2
116 INFO: Python: 3.9.2
117 INFO: Platform: Windows-10-10.0.19041-SP0
118 INFO: wrote C:\Users\Χρήστος\Desktop\radio\peradio2.spec
121 INFO: UPX is not available.
122 INFO: Extending PYTHONPATH with paths
['C:\Users\Χρήστος\Desktop\radio', 'C:\Users\Χρήστος\Desktop\radio']
135 INFO: checking Analysis
138 INFO: Building because C:\Users\Χρήστος\Desktop\radio\peradio2.py changed
138 INFO: Initializing module dependency graph...
141 INFO: Caching module graph hooks...
148 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
152 INFO: Analyzing base_library.zip ...
2350 INFO: Processing pre-find module path hook distutils from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
2351 INFO: distutils: retargeting to non-venv dir 'c:\python\lib'
5208 INFO: Caching module dependency graph...
5297 INFO: running Analysis Analysis-00.toc
5314 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python.exe
5389 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\python\python39.dll
5564 INFO: Analyzing C:\Users\Χρήστος\Desktop\radio\peradio2.py
5566 INFO: Processing module hooks...
5567 INFO: Loading module hook 'hook-difflib.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5569 INFO: Excluding import of doctest from module difflib
5569 INFO: Loading module hook 'hook-distutils.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5570 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5572 INFO: Excluding import of lib2to3.refactor from module distutils.util
5572 INFO: Loading module hook 'hook-encodings.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5642 INFO: Loading module hook 'hook-heapq.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5643 INFO: Excluding import of doctest from module heapq
5644 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5697 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5699 INFO: Excluding import of test from module multiprocessing.util
5699 INFO: Excluding import of test.support from module multiprocessing.util
5700 INFO: Loading module hook 'hook-pickle.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5701 INFO: Excluding import of argparse from module pickle
5701 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5702 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5703 INFO: Loading module hook 'hook-xml.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5760 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\python\lib\site-packages\PyInstaller\hooks'...
5896 INFO: checking Tree
5959 INFO: checking Tree
6148 INFO: checking Tree
6165 INFO: Looking for ctypes DLLs
6188 INFO: Analyzing run-time hooks ...
6191 INFO: Including run-time hook 'c:\python\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
6196 INFO: Looking for dynamic libraries
6320 INFO: Looking for eggs
6321 INFO: Using Python library c:\python\python39.dll
6321 INFO: Found binding redirects:
[]
6325 INFO: Warnings written to C:\Users\Χρήστος\Desktop\radio\build\peradio2\warn-peradio2.txt
6359 INFO: Graph cross-reference written to C:\Users\Χρήστος\Desktop\radio\build\peradio2\xref-peradio2.html
6366 INFO: checking PYZ
6375 INFO: Building because toc changed
6375 INFO: Building PYZ (ZlibArchive) C:\Users\Χρήστος\Desktop\radio\build\peradio2\PYZ-00.pyz
6905 INFO: Building PYZ (ZlibArchive) C:\Users\Χρήστος\Desktop\radio\build\peradio2\PYZ-00.pyz completed successfully.
6912 INFO: checking PKG
6920 INFO: Building because toc changed
6920 INFO: Building PKG (CArchive) PKG-00.pkg
6940 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
6941 INFO: Bootloader c:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
6942 INFO: checking EXE
6951 INFO: Rebuilding EXE-00.toc because peradio2.exe missing
6952 INFO: Building EXE from EXE-00.toc
7007 INFO: Copying icons from ['c:\python\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
7071 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
7071 INFO: Writing RT_ICON 1 resource with 3752 bytes
7072 INFO: Writing RT_ICON 2 resource with 2216 bytes
7073 INFO: Writing RT_ICON 3 resource with 1384 bytes
7073 INFO: Writing RT_ICON 4 resource with 37019 bytes
7073 INFO: Writing RT_ICON 5 resource with 9640 bytes
7074 INFO: Writing RT_ICON 6 resource with 4264 bytes
7074 INFO: Writing RT_ICON 7 resource with 1128 bytes
7103 INFO: Appending archive to EXE C:\Users\Χρήστος\Desktop\radio\build\peradio2\peradio2.exe
7261 INFO: Building EXE from EXE-00.toc completed successfully.
7264 INFO: checking COLLECT
7264 INFO: Building COLLECT because COLLECT-00.toc is non existent
7265 INFO: Building COLLECT COLLECT-00.toc
7570 INFO: Building COLLECT COLLECT-00.toc completed successfully.
C:\Users\Χρήστος\Desktop\radio>pyinstaller --hidden-import=miniaudio peradio2.py
118 INFO: PyInstaller: 4.2
119 INFO: Python: 3.9.2
120 INFO: Platform: Windows-10-10.0.19041-SP0
121 INFO: wrote C:\Users\Χρήστος\Desktop\radio\peradio2.spec
123 INFO: UPX is not available.
130 INFO: Extending PYTHONPATH with paths
['C:\Users\Χρήστος\Desktop\radio', 'C:\Users\Χρήστος\Desktop\radio']
144 INFO: checking Analysis
154 INFO: Building because hiddenimports changed
155 INFO: Initializing module dependency graph...
158 INFO: Caching module graph hooks...
165 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
169 INFO: Analyzing base_library.zip ...
2849 INFO: Processing pre-find module path hook distutils from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
2849 INFO: distutils: retargeting to non-venv dir 'c:\python\lib'
4998 INFO: Caching module dependency graph...
5090 INFO: running Analysis Analysis-00.toc
5103 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python.exe
5161 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\python\python39.dll
5373 INFO: Analyzing C:\Users\Χρήστος\Desktop\radio\peradio2.py
6202 INFO: Processing pre-find module path hook site from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-site.py'.
6203 INFO: site: retargeting to fake-dir 'c:\python\lib\site-packages\PyInstaller\fake-modules'
8558 INFO: Processing pre-safe import module hook six.moves from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'.
11175 INFO: Processing module hooks...
11175 INFO: Loading module hook 'hook-pycparser.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
11177 INFO: Loading module hook 'hook-pytest.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec_namespace)
File "C:\Users\Χρήστος\Desktop\radio\peradio2.spec", line 6, in <module>
a = Analysis(['peradio2.py'],
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 242, in __init__
self.__postinit__()
File "c:\python\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 420, in assemble
self.graph.process_post_graph_hooks()
File "c:\python\lib\site-packages\PyInstaller\depend\analysis.py", line 367, in process_post_graph_hooks
module_hook.post_graph()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 447, in post_graph
self._load_hook_module()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 408, in _load_hook_module
self._hook_module = importlib_load_source(
File "c:\python\lib\site-packages\PyInstaller\compat.py", line 598, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 969, in load_module
File "<frozen importlib._bootstrap_external>", line 794, in load_module
File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-pytest.py", line 18, in <module>
import pytest
File "c:\python\lib\site-packages\pytest.py", line 8, in <module>
from _pytest.assertion import register_assert_rewrite
File "c:\python\lib\site-packages\_pytest\assertion\__init__.py", line 13, in <module>
from _pytest.assertion import rewrite
File "c:\python\lib\site-packages\_pytest\assertion\rewrite.py", line 24, in <module>
from _pytest.assertion import util
File "c:\python\lib\site-packages\_pytest\assertion\util.py", line 11, in <module>
import _pytest._code
File "c:\python\lib\site-packages\_pytest\_code\__init__.py", line 7, in <module>
from .code import Code # noqa
File "c:\python\lib\site-packages\_pytest\_code\code.py", line 15, in <module>
import pluggy
File "c:\python\lib\site-packages\pluggy\__init__.py", line 16, in <module>
from .manager import PluginManager, PluginValidationError
File "c:\python\lib\site-packages\pluggy\manager.py", line 6, in <module>
import importlib_metadata
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 471, in <module>
__version__ = version(__name__)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 438, in version
return distribution(package).version
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 411, in distribution
return Distribution.from_name(package)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 179, in from_name
dists = resolver(name)
File "<frozen importlib._bootstrap_external>", line 1389, in find_distributions
File "c:\python\lib\importlib\metadata.py", line 487, in find_distributions
found = cls._search_paths(context.name, context.path)
AttributeError: 'str' object has no attribute 'name'
C:\Users\Χρήστος\Desktop\radio>pyinstaller peradio2.py
118 INFO: PyInstaller: 4.2
118 INFO: Python: 3.9.2
119 INFO: Platform: Windows-10-10.0.19041-SP0
120 INFO: wrote C:\Users\Χρήστος\Desktop\radio\peradio2.spec
123 INFO: UPX is not available.
125 INFO: Extending PYTHONPATH with paths
['C:\Users\Χρήστος\Desktop\radio', 'C:\Users\Χρήστος\Desktop\radio']
138 INFO: checking Analysis
141 INFO: Building because C:\Users\Χρήστος\Desktop\radio\peradio2.py changed
141 INFO: Initializing module dependency graph...
144 INFO: Caching module graph hooks...
151 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
155 INFO: Analyzing base_library.zip ...
2197 INFO: Processing pre-find module path hook distutils from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
2197 INFO: distutils: retargeting to non-venv dir 'c:\python\lib'
5129 INFO: Caching module dependency graph...
5250 INFO: running Analysis Analysis-00.toc
5267 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python.exe
5342 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\python\python39.dll
5538 INFO: Analyzing C:\Users\Χρήστος\Desktop\radio\peradio2.py
6348 INFO: Processing pre-find module path hook site from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-site.py'.
6351 INFO: site: retargeting to fake-dir 'c:\python\lib\site-packages\PyInstaller\fake-modules'
8738 INFO: Processing pre-safe import module hook six.moves from 'c:\python\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'.
11357 INFO: Processing module hooks...
11357 INFO: Loading module hook 'hook-pycparser.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
11359 INFO: Loading module hook 'hook-pytest.py' from 'c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks'...
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\python\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec_namespace)
File "C:\Users\Χρήστος\Desktop\radio\peradio2.spec", line 6, in <module>
a = Analysis(['peradio2.py'],
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 242, in __init__
self.__postinit__()
File "c:\python\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "c:\python\lib\site-packages\PyInstaller\building\build_main.py", line 420, in assemble
self.graph.process_post_graph_hooks()
File "c:\python\lib\site-packages\PyInstaller\depend\analysis.py", line 367, in process_post_graph_hooks
module_hook.post_graph()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 447, in post_graph
self._load_hook_module()
File "c:\python\lib\site-packages\PyInstaller\depend\imphook.py", line 408, in _load_hook_module
self._hook_module = importlib_load_source(
File "c:\python\lib\site-packages\PyInstaller\compat.py", line 598, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 469, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 969, in load_module
File "<frozen importlib._bootstrap_external>", line 794, in load_module
File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\python\lib\site-packages\pyinstaller_hooks_contrib-2021.1-py3.9.egg\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-pytest.py", line 18, in <module>
import pytest
File "c:\python\lib\site-packages\pytest.py", line 8, in <module>
from _pytest.assertion import register_assert_rewrite
File "c:\python\lib\site-packages\_pytest\assertion\__init__.py", line 13, in <module>
from _pytest.assertion import rewrite
File "c:\python\lib\site-packages\_pytest\assertion\rewrite.py", line 24, in <module>
from _pytest.assertion import util
File "c:\python\lib\site-packages\_pytest\assertion\util.py", line 11, in <module>
import _pytest._code
File "c:\python\lib\site-packages\_pytest\_code\__init__.py", line 7, in <module>
from .code import Code # noqa
File "c:\python\lib\site-packages\_pytest\_code\code.py", line 15, in <module>
import pluggy
File "c:\python\lib\site-packages\pluggy\__init__.py", line 16, in <module>
from .manager import PluginManager, PluginValidationError
File "c:\python\lib\site-packages\pluggy\manager.py", line 6, in <module>
import importlib_metadata
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 471, in <module>
__version__ = version(__name__)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 438, in version
return distribution(package).version
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 411, in distribution
return Distribution.from_name(package)
File "c:\python\lib\site-packages\importlib_metadata\__init__.py", line 179, in from_name
dists = resolver(name)
File "<frozen importlib._bootstrap_external>", line 1389, in find_distributions
File "c:\python\lib\importlib\metadata.py", line 487, in find_distributions
found = cls._search_paths(context.name, context.path)
AttributeError: 'str' object has no attribute 'name'
我尝试卸载并重新安装 pyinstall 6 enum34 和 setuptools,但错误并没有消失。
第一次使用miniaudio模块。 谁能帮我一下?
提前致谢, 克里斯·帕帕斯
**编辑:**我发现这不是唯一关于该问题的模块。
pip uninstall importlib-metadata
pip install importlib-metadata
修正错误!!!
我有这个模块的一个非常旧的版本 0.x。现在 3.x