本文介绍了Pkg_resource ces.DistributionNotFound:';json架构';的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
无法运行"intel-Nauta",因为它引发了此错误:pkg_resource ces.DistributionNotFound:找不到应用程序所需的‘jsonschema’分发[19160]无法执行主脚本。python3.0
https://github.com/docker/compose/issues/1305
https://github.com/Julian/jsonschema/issues/228
https://github.com/Julian/jsonschema/issues/228
不是一个很棒的程序员,请帮帮忙。发布整个错误跟踪:
File "main.py", line 27, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:users****downloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commandsexperimentexperiment.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commandsexperimentlist.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commandsexperimentcommon.py", line 54, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "utiljupyter_notebook_creator.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "libsite-packages
bformat\__init__.py", line 33, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "libsite-packages
bformatvalidator.py", line 12, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "libsite-packagesjsonschema\__init__.py", line 33, in <module>
File "libsite-packagespkg_resources\__init__.py", line 481, in get_distribution
File "libsite-packagespkg_resources\__init__.py", line 357, in get_provider
File "libsite-packagespkg_resources\__init__.py", line 900, in require
File "libsite-packagespkg_resources\__init__.py", line 786, in resolve
pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found and is required by the application
[11672] Failed to execute script main
C:UsersxxxxxDownloads
auta
auta-developapplicationsclidist>nctl --help
Traceback (most recent call last):
File "main.py", line 27, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commandsexperimentexperiment.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commandsexperimentlist.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commandsexperimentcommon.py", line 54, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "utiljupyter_notebook_creator.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "libsite-packages
bformat\__init__.py", line 33, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "libsite-packages
bformatvalidator.py", line 12, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:usersxxxxxdownloads
auta
auta-developapplicationscli.venvlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "libsite-packagesjsonschema\__init__.py", line 33, in <module>
File "libsite-packagespkg_resources\__init__.py", line 481, in get_distribution
File "libsite-packagespkg_resources\__init__.py", line 357, in get_provider
File "libsite-packagespkg_resources\__init__.py", line 900, in require
File "libsite-packagespkg_resources\__init__.py", line 786, in resolve
pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found and is required by the application
[19160] Failed to execute script main
推荐答案
问题出在PYInstaller不能使用新版本的json架构。在Nautahttps://github.com/IntelAI/nauta/commit/8806aaa87a25d17d89a9aa9062571620d63e2b48中已经有一种解决方法,在该方法中,Requirements s.txt强制jsonschema==2.6.0请获取最新版本,然后再次尝试内部版本。
这篇关于Pkg_resource ces.DistributionNotFound:';json架构';的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!