Hb -h出错
Traceback (most recent call last):
File “/home/demo/.local/bin/hb”, line 8, in
sys.exit(main())
File “/home/demo/.local/lib/python3.10/site-packages/hb/main.py”, line 49, in main
topdir = find_top()
File “/home/demo/.local/lib/python3.10/site-packages/hb/main.py”, line 37, in find_top
raise
Exception: Please call hb utilities inside source root directory
- 卸载pip python3 -m pip uninstall ohos-build
- 安装python3 -m pip install --user ohos-build==0.4.3
- 此时应该就可以了
- 如果再次输入hb -h报错如下
1.按照最后提示的路径
打开/.local/lib/python3.10/sitepackages/prompt_toolkit/styles/from_dict.py
.local文件夹在源目录下是隐藏文件夹,将Show hidden files选上按照路径打开from_dict.py
- ****打开后将from collections import Mapping改为from collections.abc import Mapping
保存后再次输入hb -h就好了