วันพุธที่ 7 กุมภาพันธ์ พ.ศ. 2561

(Week 5-1) TDD Chapter 5: Saving User Input: Testing the Database --Problem--


เนื่องจากในบทที่ 5 ย่อหน้าดังรูปข้างต้น


ในหนังสือให้ทดสอบฟังก์ชั้น "f-sting" ที่มีเพิ่มใหม่ใน django 3.6
ซึ่ง version ที่ผมลงคือ django 3.5.2
และ ubuntu version 16.04 สามารถอัพเกรดได้สูงสุดที่ version 3.5.2 ด้วยคำสั่งพื้นฐาน
sudo apt-get install python3.6 ใช้ไม่ได้ใน ubuntu version นี้)


ผมจึงได้ค้นหาวิธีอัพเกรดจนเจอ 

Ubuntu 14.04 and 16.04

If you are using Ubuntu 14.04 or 16.04, you can use J Fernyhough's PPA at https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6:
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
Alternatively, you can use Felix Krull's deadsnakes PPA at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6

Ubuntu 16.10 and 17.04

If you are using Ubuntu 16.10 or 17.04, then Python 3.6 is in the universe repository, so you can just run:
sudo apt-get update
sudo apt-get install python3.6

After installation for Ubuntu 14.04, 16.04, 16.10 and 17.04

To invoke the Python 3.6 interpreter, run python3.6.

Ubuntu 17.10

Ubuntu 17.10 already comes with Python 3.6 as default. Just run python3 to invoke it.
แต่เมื่อทำการลงเสร็จแล้วใน python 3.6 ไม่สามารถ import django และ selenium ได้
จึงขอทำการข้าม หัวข้อนี้ในหนังสือ TDD

ไม่มีความคิดเห็น:

แสดงความคิดเห็น