出現問題場景
Ubuntn中原有Python3.5,現升級安裝Python3.7 之後在多個使用場景下, 出現以下問題:
問題1 status 1
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
問題2 status 2
returned non-zero exit status 2.
解決方法
# 先查找 lsb_release文件,可能需要再加上 sudo
find / -name lsb_release
# 找到後刪除
rm -rf /usr/bin/lsb_release
附:
本人蔘照的Python3升級流程
Ubuntu下升級 python3.7.1流程備忘(推薦)