同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Symptom
Garbled characters and segmentation faults occur during the execution of the python3 -m pip install --user ohos-build command.
Possible Causes
pip is of an early version.
Solutions
Upgrade pip.
python3 -m pip install -U pip
Symptom
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the python3 -m pip install --user ohos-build command.
Possible Causes
The distutils module is unavailable.
Solutions
Install distutils.
sudo apt-get install python3.8-distutils
Symptom
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the python3 -m pip install --user ohos-build command.
Possible Causes
There is a compatibility issue of python3-pip.
Solutions
Reinstall pip.
sudo apt remove python3-pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Symptom
The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the python3 -m pip install --user ohos-build command.
Possible Causes
The installation fails due to poor network connectivity.
Solutions
Ensure that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb.
If the network is functional, run the following commands to install hb by specifying a temporary PyPI source:
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ohos-build
Symptom
The message "ImportError: No module named apt_pkg" is displayed when an unidentifiable command is executed on the Linux server.
Possible Causes
There is a compatibility issue of python3-apt.
Solutions
Reinstall python3-apt.
sudo apt-get remove python3-apt
sudo apt-get install python3-apt
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。