WindowsでPythonを始めてみる
とりあえず、今更ながらPython熱が発生しました。
というわけでまずはインストールしてみました。
下記のファイルをインストールしたいフォルダにおいて、管理者権限で実行。
$scriptPath = $MyInvocation.MyCommand.Path $currentFolder = Split-Path -Parent $scriptPath $download = Join-Path $currentFolder "python-3.5.1-embed-amd64.zip" # ダウンロード Invoke-WebRequest -Uri 'https://www.python.org/ftp/python/3.5.1/python-3.5.1-embed-amd64.zip' -OutFile $download -Verbose -PassThru # 解凍 Expand-Archive -Path $download -DestinationPath $currentFolder # 環境変数に登録 $path = [System.Environment]::GetEnvironmentVariable('PATH', 'Machine') $path += ';' + $currentFolder [System.Environment]::SetEnvironmentVariable('PATH', $path, 'Machine')