【問題解決】Ubuntu中Python3升級高版本後 Err returned non-zero status 1 或者status 2問題解決

出現問題場景
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流程備忘(推薦)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章