由于抛出此错误而无法运行“ intel-nauta”:pkg_resources.DistributionNotFound:未找到'jsonschema'分发,应用程序需要该分发 [19160]无法执行脚本main。
python 3.0
在pip安装jsonschema时,它说要求已经找到。 更改版本仍然错误仍然存在。 参考了以下链接。 https://github.com/IntelAI/nauta/blob/develop/docs/user-guide/actions/getting_started.md
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\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commands\experiment\experiment.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:\users\xxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commands\experiment\list.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:\users\xxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commands\experiment\common.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:\users\xxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "util\jupyter_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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "lib\site-packages\nbformat\__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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "lib\site-packages\nbformat\validator.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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "lib\site-packages\jsonschema\__init__.py", line 33, in <module>
File "lib\site-packages\pkg_resources\__init__.py", line 481, in get_distribution
File "lib\site-packages\pkg_resources\__init__.py", line 357, in get_provider
File "lib\site-packages\pkg_resources\__init__.py", line 900, in require
File "lib\site-packages\pkg_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:\Users\xxxxx\Downloads\nauta\nauta-develop\applications\cli\dist>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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commands\experiment\experiment.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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commands\experiment\list.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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "commands\experiment\common.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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "util\jupyter_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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "lib\site-packages\nbformat\__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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "lib\site-packages\nbformat\validator.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:\users\xxxxx\downloads\nauta\nauta-develop\applications\cli\.venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "lib\site-packages\jsonschema\__init__.py", line 33, in <module>
File "lib\site-packages\pkg_resources\__init__.py", line 481, in get_distribution
File "lib\site-packages\pkg_resources\__init__.py", line 357, in get_provider
File "lib\site-packages\pkg_resources\__init__.py", line 900, in require
File "lib\site-packages\pkg_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
答案 0 :(得分:0)
问题在于pyinstaller无法与新版本jsonschema一起使用。在nauta https://github.com/IntelAI/nauta/commit/8806aaa87a25d17d89a9aa9062571620d63e2b48中已经存在一种解决方法,其中requirements.txt强制jsonschema == 2.6.0 请提取最新版本,然后重试构建。