โดย mindphp » 21/11/2019 7:04 am
เปลี่ยน Default
Python3 บนเครื่อง Ubuntu 16.04 จาก Python3.5 เป็น Python3.6
ปกติ บน Ubuntu 16.04 จะมี Python อยู่ สองเวอร์ชั่นคือ Default Python จะเป็น Python 2
ก่อนอื่น เช็คเวอร์ชั่น Python กันก่อน
ถ้าได้ผลแบบนี้
Python 3.5.x
ติดตั้ง Python 3.6
โค้ด: เลือกทั้งหมด
sudo add-apt-repository ppa:jonathonf/python-3.6
เสร็จแล้ว ทำลิงค์ python3 ใหม่ โดย
ทดสอบถามเวอร์ชั่น Python3 บน Ubuntu ใหม่
จะได้ผลดังนี้
Python 3.6.8
ติดตามบทเรียนเขียน Python พื้นฐานได้ที่นี่ ,
Python กับ GUI ,
VDO สอน Python
สอบถามปัญหาการใช้งาน การทำ Server ได้ที่นี่
เปลี่ยน Default [url=https://www.mindphp.com/%E0%B8%84%E0%B8%B9%E0%B9%88%E0%B8%A1%E0%B8%B7%E0%B8%AD/73-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3/2417-python-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3.html]Python3[/url] บนเครื่อง Ubuntu 16.04 จาก Python3.5 เป็น Python3.6
ปกติ บน Ubuntu 16.04 จะมี Python อยู่ สองเวอร์ชั่นคือ Default Python จะเป็น Python 2
ก่อนอื่น เช็คเวอร์ชั่น Python กันก่อน
[code]python3 --version[/code]
ถ้าได้ผลแบบนี้
[quote]Python 3.5.x[/quote]
ติดตั้ง Python 3.6
[code]sudo add-apt-repository ppa:jonathonf/python-3.6[/code]
[code]sudo apt-get update[/code]
[code]sudo apt-get install python3.6[/code]
เสร็จแล้ว ทำลิงค์ python3 ใหม่ โดย
[code]cd /usr/bin/[/code]
[code]ln -sf python3.6 python3[/code]
ทดสอบถามเวอร์ชั่น Python3 บน Ubuntu ใหม่
[code]python3 --version[/code]
จะได้ผลดังนี้
[quote]Python 3.6.8[/quote]
[url=https://mindphp.com/%E0%B8%9A%E0%B8%97%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%AD%E0%B8%AD%E0%B8%99%E0%B9%84%E0%B8%A5%E0%B8%99%E0%B9%8C/83-python.html]ติดตามบทเรียนเขียน Python พื้นฐานได้ที่นี่ [/url], [url=https://mindphp.com/%E0%B8%9A%E0%B8%97%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%AD%E0%B8%AD%E0%B8%99%E0%B9%84%E0%B8%A5%E0%B8%99%E0%B9%8C/python-gui.html]Python กับ GUI[/url] , [url=https://www.mindphp.com/vdo-tutorial-python.html]VDO สอน Python [/url]
[url=https://www.mindphp.com/forums/viewforum.php?f=3]สอบถามปัญหาการใช้งาน การทำ Server ได้ที่นี่ [/url]