问题1:Python版本问题
报错信息:
NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer
ubuntu 18默认的python3是3.6.
解决方案1:从源码安装python 3.7
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
tar -xzvf Python-3.7.4.tgz
cd Python-3.7.4
./configure --prefix=/usr/local/src/python37? # 配置安装位置
sudo make
sudo make install
?解决方案2:安装python 3.7(推荐)
sudo apt install python3.7
sudo rm -rf? /usr/bin/python3
sudo ln -s? /usr/bin/python3.7?/usr/bin/python3
?pip3 install ninja 失败找不到ninja
更新python源:
切换到根目录下
$?cd?~
新建.pip
目录并进入
$?mkdir?.pip $?cd?.pip
新建pip.conf
文件并用vim打开
$?touch?pip.conf $?vim?pip.conf
4. 将以下写入
[global] index-url?=?https://artsz.zte.com.cn/artifactory/api/pypi/public-pypi-virtual/simple [install] trusted-host=artsz.zte.com.cn
5. 重新安装
sudo apt-get install python3-pip
sudo pip3?install meson
sudo pip3?install ninja