程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Method of manually adding Python environment variables in windows10

編輯:Python

1 install IDLE You didn't add Python environment variable

In the installation IDLE when , You need to select the installation path Python Configuration to Windows10 Of the system variables , Pictured 1 Shown .

chart 1 install IDLE

among , chart 1① Express IDLE Installation location ; chart 1② It means that you will Python3.10 Add to Windows10 Of the system variables , This option is not selected by default , So in installation IDLE Can easily be ignored . If installing IDLE This option is not selected when , After installation , stay CMD Input in “python” Command Click “ enter ” After keystroke , Will pop up “Microsoft Store” Dialog box , Prompt users to download Python, Pictured 2 Shown .

chart 2 Does not add Python environment variable

  Related links 1: environment variable , It refers to an object with a specific name in the operating system , It contains information used by one or more applications . for example ,Path Environment variables are when the system is required to run a program without telling the full path of the program , In addition to finding this program in the current directory , It should be here Path Find the path specified in the environment variable .

therefore , When we're in CMD Input in “python” After the instruction , The system starts with “C:\Users\Administrator” Search for “python”, After the Path Environment variables “python”, Because we didn't put python Add to system variable , So the system cannot find “python” Program , This will pop up “Microsoft Store” Dialog box , Prompt users to download Python.

2 Add environment variables manually

stay Windows10 From the desktop of “ This computer ”, Then select... From the right-click menu “ attribute ”, Pop up the picture 3 The dialog shown , Choose the one on the left “ Advanced system setup ”.

chart 3 System dialog

  after , In the pop-up “ System attribute ” Select... In the dialog box “ environment variable ” Key , Pictured 4 Shown .

chart 4 “ System attribute ” Dialog box

  after , stay “ environment variable ” In the dialog box “Administrator The user variable for ” Column “Path” Variable , After clicking on “ edit ” Key , Pictured 5 Shown .

chart 5 “ environment variable ” Dialog box

  In the pop-up “ Edit environment variables ” In the dialog box , Click on “ newly build ” Key , Pictured 6 Shown .

chart 6 “ Edit environment variables ” Dialog box

after , adopt “ newly build ” Key , add to

“C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\” and

“C:\Users\Administrator\AppData\Local\Programs\Python\Python310\” two , The values of these two terms are the graph 1① Shown in Python The installation path , Pictured 7 Shown .

chart 7 Add environment variables

  after , Check the two items added , adopt “ Move upward ” Press the key to move these two items to the top of the table , Pictured 8 Shown .

chart 8 Move item

  Last , Restart the system , stay CMD Input in “python”, Click on “ enter ” After keystroke , Will enter Python The environment , Pictured 9 Shown .

chart 9 Get into Python Environmental Science

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved