
我一直在嘗試在 Debian buster 伺服器上將 python 升級到 3.7。如果我輸入python3 --version
它會返回python 3.6.1
.但是,如果我運行sudo apt install python3
它會返回以下內容:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.7.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
同樣運行sudo apt-get install python3.7
給出以下輸出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.7 is already the newest version (3.7.3-2).
python3.7 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
那麼,看起來 Python 3.7 已安裝,但為什麼它會返回正在使用的版本為 3.6.1 ?
有什麼想法可以解決這個問題以使用 python 3.7 嗎?