3 Txoj Kev Txhim Kho Python ntawm Windows

Cov txheej txheem:

3 Txoj Kev Txhim Kho Python ntawm Windows
3 Txoj Kev Txhim Kho Python ntawm Windows

Video: 3 Txoj Kev Txhim Kho Python ntawm Windows

Video: 3 Txoj Kev Txhim Kho Python ntawm Windows
Video: Tshuaj theem vim li cas thiaj tau nqi ?/ Siv kho mob dab tsi?/paris polyphylla use for? 2024, Plaub Hlis Ntuj
Anonim

Yog tias koj xav pib lub phiaj xwm hauv Python ntawm koj lub PC Windows, koj yuav tsum rub tawm thiab teeb tsa ib qho ntawm Python. Qhov wikiHow qhia koj yuav ua li cas rau nruab Python (2 lossis 3) siv tus nom Windows installer, nrog rau yuav kho li cas "nab nab tsis tau lees paub tias yog kev hais sab hauv lossis sab nraud" uas qee cov neeg siv ntsib tom qab teeb tsa nws.

Cov kauj ruam

Txoj Kev 1 ntawm 3: Txhim Kho Python 3

Nruab Python ntawm Windows Kauj Ruam 1
Nruab Python ntawm Windows Kauj Ruam 1

Kauj Ruam 1. Mus rau

Qhov tshiab tshaj ntawm Python yuav tshwm nyob rau ntawm "Rub" khawm nyob ze rau sab saum toj ntawm nplooj ntawv.

Yog tias koj xav siv Python 2, saib "Txhim Kho Python 2" txoj kev

Nruab Python ntawm Windows Kauj Ruam 2
Nruab Python ntawm Windows Kauj Ruam 2

Kauj ruam 2. Nyem Download Python

Yog tias qhov no tsis pib rub tawm tam sim ntawd, nyem Txuag ntawm lub qhov rai pop-up kom pib nws.

Python 3.7 thiab tshiab dua yuav ua haujlwm ntawm txhua lub Windows ua haujlwm tshwj tsis yog Windows XP. Yog tias koj xav tau teeb tsa Python 3 ntawm XP, nqes mus thiab nyem Rub tawm ib sab ntawm qhov hloov tshiab tshaj tawm ntawm Python 3.4

Nruab Python ntawm Windows Kauj Ruam 3
Nruab Python ntawm Windows Kauj Ruam 3

Kauj Ruam 3. Khiav lub installer

Koj tuaj yeem ua li ntawd los ntawm ob-nias sej -.exe hauv koj daim nplaub tshev Downloads.

Nruab Python ntawm Windows Kauj Ruam 4
Nruab Python ntawm Windows Kauj Ruam 4

Kauj Ruam 4. Kos rau lub npov tom ntej "Ntxiv Python rau PATH

" Nws nyob hauv qab ntawm lub qhov rais.

Yog tias koj tsis pom qhov kev xaiv no, koj yuav tsum ua tiav txoj hauv kev no tom qab koj ua tiav kev txhim kho Python

Nruab Python ntawm Windows Kauj Ruam 5
Nruab Python ntawm Windows Kauj Ruam 5

Kauj Ruam 5. Nyem rau Customize installation

Nws yog qhov txuas xiav thib ob ntawm lub qhov rais.

Nruab Python ntawm Windows Kauj Ruam 6
Nruab Python ntawm Windows Kauj Ruam 6

Kauj Ruam 6. Txheeb xyuas cov kev xaiv teeb tsa thiab nyem Tom ntej

Txhua yam ntawm Python cov yam ntxwv raug xaiv los ntawm lub neej ntawd. Tshwj tsis yog tias koj muaj qhov tshwj xeeb xav tau hla kev txhim kho ib feem ntawm pob no, tsuas yog tso cov kev teeb tsa ib leeg.

Nruab Python ntawm Windows Kauj Ruam 7
Nruab Python ntawm Windows Kauj Ruam 7

Kauj Ruam 7. Kos rau lub npov tom ntej no "Nruab rau txhua tus neeg siv

" Yog tias koj yog tus tswj hwm qhov system, qhov kev xaiv no ua kom ntseeg tau tias lwm tus neeg siv ntawm lub khoos phis tawj no tuaj yeem siv Python. Qhov no tseem hloov pauv qhov chaw teeb tsa mus rau Program Files (x86) Python (version) hloov chaw ntawm koj lub tsev qiv ntawv ntiag tug.

  • Yog tias koj tsis muaj txoj hauv kev xaiv "Ntxiv Python rau PATH" ua ntej, nco ntsoov cov npe teeb tsa uas tshwm ntawm no. Koj yuav tsum tau ntxiv nws rau koj qhov system hloov pauv tom qab kev teeb tsa.
  • Yog tias koj tsis xav kom lwm tus neeg hauv computer tuaj yeem siv Python, koj tuaj yeem tawm lub thawv tsis raug tshuaj xyuas.
Nruab Python ntawm Windows Kauj Ruam 8
Nruab Python ntawm Windows Kauj Ruam 8

Kauj Ruam 8. Nyem Nruab

Nws nyob hauv qab ntawm lub qhov rais.

Nruab Python ntawm Windows Kauj Ruam 9
Nruab Python ntawm Windows Kauj Ruam 9

Kauj Ruam 9. Nyem Yog kom paub meej

Qhov no teeb tsa Python ntawm koj lub PC. Thaum qhov kev teeb tsa tiav, koj yuav pom "Teeb tsa tau ua tiav" qhov rai-tsis txhob kaw nws tseem tsis tau.

Nruab Python ntawm Windows Kauj Ruam 10
Nruab Python ntawm Windows Kauj Ruam 10

Kauj Ruam 10. Nyem Disable path length limit

Nws yog mus rau hauv qab ntawm "Teeb tau ua tiav" lub qhov rais. Cov kauj ruam kawg no ua kom ntseeg tau tias Python (thiab lwm yam apps) siv txoj hauv kev ntau dua 260 tus cim hauv qhov ntev.

Nruab Python ntawm Windows Kauj Ruam 11
Nruab Python ntawm Windows Kauj Ruam 11

Kauj Ruam 11. Nyem Yog kom paub meej

Nab hab sej tam sim no tau teeb tsa thiab npaj siv.

Nruab Python ntawm Windows Kauj Ruam 12
Nruab Python ntawm Windows Kauj Ruam 12

Kauj Ruam 12. Nyem Kaw kom tawm lub installer

Nruab Python ntawm Windows Kauj Ruam 13
Nruab Python ntawm Windows Kauj Ruam 13

Kauj Ruam 13. Kuaj koj qhov kev teeb tsa Python

Nov yog yuav ua li cas kom ntseeg tau tias txoj hauv kev tau teeb tsa kom raug:

  • Ntaus cmd rau hauv Windows tshawb nrhiav bar thiab nias ↵ Enter.
  • Ntaus nab hab sej ↵ Enter. Koj yuav tsum pom >>> thaum pib ntawm kab tam sim no. Qhov no txhais tau tias Python ua haujlwm thiab txoj hauv kev tau teeb tsa kom raug.
  • Yog tias koj pom qhov yuam kev uas hais tias "nab hab sej tsis tau lees paub tias yog kev hais sab hauv lossis sab nraud," saib "Ntxiv Txoj Hauv Kev Python rau Windows".
  • Ntaus tawm () rov qab mus rau qhov hais kom ua sai.

Txoj Kev 2 ntawm 3: Txhim Kho Python 2

Nruab Python ntawm Windows Kauj Ruam 14
Nruab Python ntawm Windows Kauj Ruam 14

Kauj Ruam 1. Mus rau https://www.python.org/downloads hauv web browser

Siv txoj hauv kev no yog tias koj xav sau cov cai hauv Python 2 hloov chaw (lossis ntxiv rau) Python 3 hauv Windows.

Nruab Python ntawm Windows Kauj Ruam 15
Nruab Python ntawm Windows Kauj Ruam 15

Kauj Ruam 2. Scroll cia thiab nyem rau Python 2 version

Cov ntawv tshwm nyob hauv qab "Saib rau qhov tso tawm tshwj xeeb?" taub hau.

Yog tias koj tsis paub tias version ntawm Python 2 rau nruab, tsuas yog nyem thawj version pib nrog "2." Hauv daim ntawv. Qhov no ua kom ntseeg tau tias koj tab tom siv qhov hloov kho tshiab tshaj plaws

Nruab Python ntawm Windows Kauj Ruam 16
Nruab Python ntawm Windows Kauj Ruam 16

Kauj Ruam 3. Scroll cia thiab xaiv tus nruab

Qhov no rub tawm lub installer rau koj lub khoos phis tawj, txawm hais tias koj yuav tau nyem Txuag kom pib rub tawm.

  • Yog tias koj muaj lub khoos phis tawj 64-ntsis, xaiv Windows x86-64 MSI installer.
  • Yog tias koj siv lub khoos phis tawj 32-ntsis, xaiv Windows x86 MSI installer.
Nruab Python ntawm Windows Kauj Ruam 17
Nruab Python ntawm Windows Kauj Ruam 17

Kauj Ruam 4. Khiav tus Python installer

Koj tuaj yeem ua qhov no los ntawm ob-nias nab hab sej- (version).msi hauv koj daim nplaub tshev Downloads.

Nruab Python ntawm Windows Kauj Ruam 18
Nruab Python ntawm Windows Kauj Ruam 18

Kauj Ruam 5. Xaiv qhov kev xaiv rau kev teeb tsa

Yog tias koj xav kom lwm tus siv ntawm lub PC no tuaj yeem siv Python, xaiv Nruab rau txhua tus neeg siv. Yog tsis yog, xaiv Nruab rau kuv nkaus xwb.

Nruab Python ntawm Windows Kauj Ruam 19
Nruab Python ntawm Windows Kauj Ruam 19

Kauj Ruam 6. Nyem Tom ntej

Nws nyob hauv kaum-txoj cai kaum.

Nruab Python ntawm Windows Kauj Ruam 20
Nruab Python ntawm Windows Kauj Ruam 20

Kauj Ruam 7. Xaiv cov npe teeb tsa (xaiv tau)

Cov ntawv teev npe tsis raug yog qhov zoo rau cov neeg feem coob, tab sis koj tuaj yeem hloov nws yog tias koj xav tau los ntawm kev xaiv lwm daim nplaub tshev los ntawm cov ntawv qhia zaub mov.

Nruab Python ntawm Windows Kauj Ruam 21
Nruab Python ntawm Windows Kauj Ruam 21

Kauj ruam 8. Nyem Next

Nruab Python ntawm Windows Kauj Ruam 22
Nruab Python ntawm Windows Kauj Ruam 22

Kauj Ruam 9. Qhib mus rau hauv qab ntawm "Customize Python" cov npe teev

Koj yuav tsum pom qhov kev xaiv hu ua "Ntxiv python.exe rau Txoj Kev." Tej zaum nws muaj "X" ntawm nws lub khawm sib xws.

Yog tias koj tsis pom qhov kev xaiv no, saib cov txheej txheem no tom qab txhim kho Python

Nruab Python ntawm Windows Kauj Ruam 23
Nruab Python ntawm Windows Kauj Ruam 23

Kauj ruam 10. Nyem rau X khawm tom ntej "Ntxiv python.exe rau Txoj Kev

Cov ntawv qhia zaub mov yuav nthuav dav.

Nruab Python ntawm Windows Kauj Ruam 24
Nruab Python ntawm Windows Kauj Ruam 24

Kauj Ruam 11. Nyem Yuav raug teeb tsa ntawm lub hard drive hauv zos

Qhov no ua kom ntseeg tau tias koj tuaj yeem khiav Python cov lus txib los ntawm txhua qhov chaw yam tsis tas yuav ntaus txoj hauv kev rau Python.

Nruab Python ntawm Windows Kauj Ruam 25
Nruab Python ntawm Windows Kauj Ruam 25

Kauj ruam 12. Nyem Next

Kev nyab xeeb pop-up yuav tshwm ntawm ntau lub tshuab ntawm qhov no.

Nruab Python ntawm Windows Kauj Ruam 26
Nruab Python ntawm Windows Kauj Ruam 26

Kauj Ruam 13. Nyem Yog mus txuas ntxiv

Qhov no teeb tsa Python 2 ntawm PC. Hauv ob peb lub sijhawm, koj yuav pom lub qhov rai uas hais tias "Ua tiav Python Installer."

Nruab Python ntawm Windows Kauj Ruam 27
Nruab Python ntawm Windows Kauj Ruam 27

Kauj Ruam 14. Nyem Finish rau ntawm lub installer

Nab hab sej tam sim no tau teeb tsa.

Nruab Python ntawm Windows Kauj Ruam 28
Nruab Python ntawm Windows Kauj Ruam 28

Kauj Ruam 15. Kuaj koj qhov kev teeb tsa Python

Nov yog yuav ua li cas kom ntseeg tau tias txoj hauv kev tau teeb tsa kom raug:

  • Ntaus cmd rau hauv Windows tshawb nrhiav bar thiab nias ↵ Enter.
  • Ntaus nab hab sej ↵ Enter. Koj yuav tsum pom >>> thaum pib ntawm kab tam sim no. Qhov no txhais tau tias Python ua haujlwm thiab txoj hauv kev tau teeb tsa kom raug.
  • Yog tias koj pom qhov yuam kev uas hais tias "nab hab sej tsis raug lees paub tias yog lus txib sab hauv lossis sab nraud," saib "Ntxiv Txoj Kev Python rau Windows".
  • Ntaus tawm () rov qab mus rau qhov hais kom ua sai.

Txoj Kev 3 ntawm 3: Ntxiv Txoj Kev Python rau Windows

Nruab Python ntawm Windows Kauj Ruam 29
Nruab Python ntawm Windows Kauj Ruam 29

Kauj Ruam 1. Nias ⊞ Yeej+R txhawm rau qhib Run dialog

Siv txoj hauv kev no yog tias koj tab tom txhim kho cov laus dua lossis pom "sej tsis tau lees paub tias yog sab hauv lossis sab nraud hais kom ua" yuam kev thaum sim siv Python.

Nruab Python ntawm Windows Kauj Ruam 30
Nruab Python ntawm Windows Kauj Ruam 30

Kauj Ruam 2. Ntaus sysdm.cpl thiab nyem OK

Qhov no qhib qhov System Properties dialog.

Nruab Python ntawm Windows Kauj Ruam 31
Nruab Python ntawm Windows Kauj Ruam 31

Kauj Ruam 3. Nyem rau Advanced tab

Nws nyob saum lub qhov rai.

Nruab Python ntawm Windows Kauj Ruam 32
Nruab Python ntawm Windows Kauj Ruam 32

Kauj Ruam 4. Nyem Hloov Ib puag ncig

Nws nyob ze ntawm lub qhov rais hauv qab.

Nruab Python ntawm Windows Kauj Ruam 33
Nruab Python ntawm Windows Kauj Ruam 33

Kauj Ruam 5. Xaiv Txoj Kev Hloov Pauv hauv "System hloov pauv

"Qhov no yog nyob hauv pab pawg thib ob ntawm qhov hloov pauv (tsis yog" Cov neeg siv hloov pauv "pawg nyob rau saum toj).

Nruab Python ntawm Windows Kauj Ruam 34
Nruab Python ntawm Windows Kauj Ruam 34

Kauj ruam 6. Nyem Kho kom raug

Nws nyob hauv qab ntawm lub qhov rais.

Nruab Python ntawm Windows Kauj Ruam 35
Nruab Python ntawm Windows Kauj Ruam 35

Kauj Ruam 7. Kho qhov hloov pauv ntawm Windows Vista thiab ua ntej

Yog tias koj siv Windows 10, 8, lossis 7, hla mus rau kauj ruam tom ntej. Yog tias koj siv XP lossis Vista:

  • Nyem rau hauv lub npov "Hloov pauv tus nqi" kom tsis xaiv cov ntawv xaiv.
  • Scroll txhua txoj kev mus rau qhov kawg ntawm cov ntawv uas twb muaj lawm hauv lub npov "Hloov pauv tus nqi".
  • Ntaus ib semicolon; qhov kawg ntawm cov ntawv (tsis muaj qhov chaw).
  • Ntaus tag nrho txoj hauv kev rau Python (piv txwv li, C: / Python27) tom qab lub semicolon.
  • Ntaus ib semicolon; qhov kawg ntawm qhov koj nyuam qhuav ntaus (tsis muaj qhov chaw).
  • Ntaus tag nrho txoj hauv kev dua, tab sis ntxiv / Scripts mus rau qhov kawg. Piv txwv: C: / Python27 / Scripts; C: / Python27 / Scripts.
  • Nyem OK kom txog thaum koj tau kaw txhua lub qhov rais, thiab tom qab ntawd rov pib koj lub PC. Tsis tas yuav txuas ntxiv nrog txoj kev no.
Nruab Python ntawm Windows Kauj Ruam 36
Nruab Python ntawm Windows Kauj Ruam 36

Kauj Ruam 8. Nyem Tshiab

Nws yog thawj lub pob nyob ze ntawm lub ces kaum sab xis saum toj ntawm lub qhov rais.

Nruab Python ntawm Windows Kauj Ruam 37
Nruab Python ntawm Windows Kauj Ruam 37

Kauj Ruam 9. Nkag mus rau tag nrho txoj kev mus rau nab hab sej

Piv txwv li, yog tias Python teeb tsa rau C: / Python27, ntaus qhov ntawd rau hauv daim teb.

Nruab Python ntawm Windows Kauj Ruam 38
Nruab Python ntawm Windows Kauj Ruam 38

Kauj Ruam 10. Nias ↵ Enter

Tam sim no koj yuav tsum nkag mus rau ib txoj hauv kev ntxiv.

Nruab Python ntawm Windows Kauj Ruam 39
Nruab Python ntawm Windows Kauj Ruam 39

Kauj Ruam 11. Nyem Tshiab dua

Nruab Python ntawm Windows Kauj Ruam 40
Nruab Python ntawm Windows Kauj Ruam 40

Kauj Ruam 12. Nkag mus rau tag nrho txoj hauv kev rau Python "Scripts" directory

Nov yog tib txoj hauv kev uas koj tau ntaus ua ntej, tshwj tsis yog koj yuav ntxiv / Cov ntawv sau mus rau qhov kawg.

Piv txwv li, C: / Python27 / Scripts

Nruab Python ntawm Windows Kauj Ruam 41
Nruab Python ntawm Windows Kauj Ruam 41

Kauj Ruam 13. Nias ↵ Enter

Koj qhov hloov pauv tshiab tau txais kev cawmdim.

Nruab Python ntawm Windows Kauj Ruam 42
Nruab Python ntawm Windows Kauj Ruam 42

Kauj Ruam 14. Nyem OK thiab ces OK dua.

Tam sim no koj yuav tsum tuaj yeem khiav Python los ntawm kab hais kom ua los ntawm kev ntaus nab npawb.

Pom zoo: