Install Python with cmd or powershell

后端 未结 3 465
执笔经年
执笔经年 2021-01-18 11:52

My question is if you can install python with powershell, cmd, vbs or any other language built into Windows already? If this was already asked please redirect me to the answ

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-18 12:23

    The best way to install Python through Windows Command Prompt will be through Chocolatey (Windows Package Manageer).

    Steps to install python 3 will be as follows :-

    1. Open CMD using 'Run as Administrator'.

    2. Download and Install Chocolatey using the following command.

    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    
    1. Download and install python using the following command.
    choco install -y python3
    
    1. You can check the version to verify if Python was successfully installed as follows.
    python --version
    

提交回复
热议问题