您好,登錄后才能下訂單哦!
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar -xvf Python-3.6.5.tgz
cd Python-3.6.5/
./configure
make && make install
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.6 2
update-alternatives --config python3
替換版本之后 pip3 install 時會提示錯誤subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
, 重點關注lsb_release.py
這個模塊
我們將python3.5中的lsb_release.py
復制到python3.6中
root@ubuntu:~# find / -name 'lsb_release.py'
/usr/lib/python2.7/dist-packages/lsb_release.py
/usr/lib/python3/dist-packages/lsb_release.py
/usr/share/pyshared/lsb_release.py
root@ubuntu:~# cp /usr/lib/python3/dist-packages/lsb_release.py /usr/local/lib/python3.6/
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。