Search In This Website

Senin, 05 Mei 2025

Set Up The Python In Microsoft Windows 8 With Picture

Set Up The Python Path variable In Microsoft Windows 8

  1. Let’s locate the directory where the Python executable is installed in our system, and note down the path to this directory.


  2. Open the "Start menu" and click "All apps" down arrow button in the bottom-left corner.


  3. Scroll through the list of apps and click "Control Panel" on the "Windows System". The Control Panel will appear on the screen.








    • Under "View by:",  click "Category"


    • then select the “System and Security” section.


    • then select the “System” section on the right side.


  4. In the System window, click on Advanced System Settings on the left sidebar.


  5. In the System Properties window (Advanced tab):


    • Click the Environment Variables button.


    • Under the System Variables section, find Path variable.


    • Click Edit button to modify the existing variable, or New button to create a new one, if the Path variable is not exist.
    • In the Variable Name field, enter Path.
      In the Variable Value field, add the path to our Python installation directory (e.g., "C:\Program Files\Python\pythonXX").
    • Click OK to apply the changes.
  6. Click OK again, click OK again in System Properties window, and restart the computer to ensure the changes take effect.







Set The Python Path Variable Via The Command Line


WARNING use the step "Set Up The Python Path variable In Microsoft Windows 8" from above, if you have Microsoft Windows Environment Variables Path more than 1024 characters!

If you would prefer to set the Python Path Variable via the command line, and your Microsoft Windows Environment Variables Path is less than 1024 characters, follow this below step  :
  1. Open Command Prompt (make sure you "Run as administrator" with right click mouse, so you're able to add a system environment variable).






  2. Set the value of the environment variable to your Python installation path as follows:
    setx /m PATH "C:\Program Files\Python\pythonXX"


  3. Close and start Command Prompt window again to reload the environment variables and restart the computer to ensure the changes take effect.




  4. Then use the following command to check the path to your Python installation been added correctly.
    echo %PATH%


Notes: 
  • Be aware if you have Microsoft Windows Environment Variables Path over than 1024 characters when assigning contents to a variable using setx, it can result in loss of data previously held by the target variable.
  • If the Path variable or Expandable Environment-Variable Strings %PATH% is exist and not empty then you can add semicolon ( ; ) and then put the directory where the Python executable is installed in our system.
  • Be aware If You running the command with an existing variable without double quotes (" "), Expandable Environment-Variable Strings %PATH% and semicolon ( ; ) can be removes any variable references.
  • Only administrators account can change the Environment Variable.
  • Non standard Command Prompt or PowerShell may not running well.
  • XX is the python version.
  • You can place the installed Python inside the no matter folder that able to execute your Python script and compile your Python script, for example "C:\Program Files\Python\pythonXX".


Bibliography

Introduction to computation and programming using Python : with application to computational modeling and understanding data;John V. Guttag;The MIT Press
Python;Abhishek Singh
Python;David Beazley;O'Reilly
Python Crash Course;Eric Matthes;No Starch Press
Python Crash Course;Erick Myers
Python;Dr. Joseph Teguh Santoso, S.Kom., M.Kom
Python;Jubilee Enterprise;Elex Media Komputindo
Python;Budi Raharjo;Informatika
Python for Everybody;Dr. Charles Russell Severance, et. al.
Python for Scientists;John M. Stewart, et. al.
Quick Python;David Matuszek;Routledge
https://superuser.com/
https://support.microsoft.com/en-us
https://www.bleepingcomputer.com/

Tidak ada komentar:

Posting Komentar