Kamis, 01 Agustus 2024

Set Up The Python In Microsoft Windows 8

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.
  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 to modify the existing variable, or New to create a new one.
    • 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").
  6. In the System Properties window, select the Path variable under the System Variables section. Click Edit, and add "C:\Program Files\Python\pythonXX" to the list of paths if it’s not already there.
  7. Click OK to apply the changes and restart the computer to ensure the changes take effect.

Set The Python Path Variable Via The Command Line

If you would prefer to set the Python Path Variable via the command line:
  1. Open Command Prompt (make sure you "Run as administrator" 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 then use the following command to check the it's been added correctly.
    echo %PATH%
  4. You should see the path to your Python installation.
Notes: XX is the python version.


Bibliography

https://realpython.com/
https://superuser.com/
https://support.microsoft.com/en-us
https://winaero.com/
https://www.bleepingcomputer.com/
https://www.ionos.co.uk/
https://www.itechtics.com/
https://www.liquidweb.com/

Tidak ada komentar:

Posting Komentar