赞
踩
在 Matter SDK 通过运行激活脚本开始构建环境部署 source scripts/activate.sh
时,出现
Getting requirements to build wheel: started error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ['/home/leung/Desktop/connectedhomeip/.environment/pigweed-venv/bin/python', '-m', 'pip', 'install', '--log', '/home/leung/Desktop/connectedhomeip/.environment/pigweed-venv/pip-requirements.log', '--requirement=/home/leung/Desktop/connectedhomeip/scripts/requirements.txt', '--constraint=/home/leung/Desktop/connectedhomeip/scripts/constraints.txt'] {'stdout': <_io.TextIOWrapper name=3 mode='w+' encoding='UTF-8'>, 'stderr': -2}
百度说有可能是 python3.10 的 pip 有问题,于是需要回退到 python3.8 版本。
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y build-dep python3 && sudo apt-get install -y pkg-config
sudo apt-get install -y build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev
cd /usr/local
sudo mkdir Python3
cd Python3
sudo wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz
tar -xzf Python-3.8.10.tgz && cd Python-3.8.10/
sudo ./configure -with-ssl prefix=/usr/local/Python3/
sudo make
sudo make install
mv /usr/bin/python3 /usr/bin/python3.bak && ln -s /usr/local/Python3/bin/python3.8 /usr/bin/python3
mv /usr/bin/pip3 /usr/bin/pip3.bak && ln -s /usr/local/Python3/bin/pip3 /usr/bin/pip3
vim ~/.zshrc
然后在文件末尾添加
export PATH=/usr/local/Python3/bin:$PATH
按ESC,输入:wq回车退出
source ~/.zshrc
pip3 install --upgrade pip
pip3 install --upgrade setuptools
如果报错,先执行
sudo rm /usr/bin/lsb_release
• 由 Leung 写于 2023 年 8 月 23 日
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。