0

I am intended to use lnt to run tests. I followed the Quick Start on my Intel MacBook. However, when I come into the step of

lnt runtest test-suite \
  --sandbox /tmp/BAR \
  --cc ~/llvm.obj.64/Release+Asserts/bin/clang \
  --cxx ~/llvm.obj.64/Release+Asserts/bin/clang++ \
  --test-suite ~/llvm-test-suite \
  --cmake-cache Release

zsh says:

zsh: command not found: lnt

Fine. So I enter the ~/mysandbox/bin and run

./lnt runtest test-suite \
  --sandbox /tmp/BAR \
  --cc ~/llvm.obj.64/Release+Asserts/bin/clang \
  --cxx ~/llvm.obj.64/Release+Asserts/bin/clang++ \
  --test-suite ~/llvm-test-suite \
  --cmake-cache Release

This time, something even more wield happens:

Traceback (most recent call last):
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/Jinja2-2.7.2-py3.11.egg/jinja2/_compat.py", line 113, in <module>
    from collections import Mapping as mapping_types
ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sunyi/mysandbox/bin/./lnt", line 33, in <module>
    sys.exit(load_entry_point('LNT', 'console_scripts', 'lnt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/click-6.7-py3.11.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/click-6.7-py3.11.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/click-6.7-py3.11.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/click-6.7-py3.11.egg/click/core.py", line 1061, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/click-6.7-py3.11.egg/click/core.py", line 1100, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sunyi/lnt/lnt/lnttool/main.py", line 153, in get_command
    return lnt.tests.get_module(name).cli_action
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sunyi/lnt/lnt/tests/__init__.py", line 32, in get_module
    module = importlib.import_module(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/sunyi/lnt/lnt/tests/test_suite.py", line 18, in <module>
    import jinja2
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/Jinja2-2.7.2-py3.11.egg/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/Jinja2-2.7.2-py3.11.egg/jinja2/environment.py", line 13, in <module>
    from jinja2 import nodes
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/Jinja2-2.7.2-py3.11.egg/jinja2/nodes.py", line 18, in <module>
    from jinja2.utils import Markup
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/Jinja2-2.7.2-py3.11.egg/jinja2/utils.py", line 14, in <module>
    from jinja2._compat import text_type, string_types, implements_iterator, \
  File "/Users/sunyi/mysandbox/lib/python3.11/site-packages/Jinja2-2.7.2-py3.11.egg/jinja2/_compat.py", line 115, in <module>
    import UserDict
ModuleNotFoundError: No module named 'UserDict'

It seems that something is wrong with the Python environment. Can you offer some advice on addressing this problem?

All my efforts are presented above. I hope to run lnt runtest successfully.

Yi Sun
  • 1

0 Answers0