0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

windows10環境でgit, pythonをインストールしてpowershell上で使う

Posted at

powershellとは

windowsで利用できる、コマンドラインインターフェース。
「Windows」+「S」で検索ボックス"powershell"と入力すると見つかるはず。

Windows10 - PowerShell(パワーシェル)の開き方

1. git のインストール

以下をダウンロードする。

git Downloading Git
64-bit Git for Windows Setup

以下の「Gitのインストール」部分記載の通り、インストールを進める。以下の記載部分は選択が必要。

Windows 10 と Powershell(WSL含む) で git を利用する
https://qiita.com/kerobot/items/78372640127771f92ee0#git-%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB

コマンドラインやPowerShellなどからGitのコマンドを利用するため「Git from the command line and also from 3rd-party software」を選択します。

powershell上で以下を実行して結果が表示されればOK

git --version
## ex.) git version 2.34.1.windows.1 等と出力されればOK

2. python のインストール

以下記事を参照し、パッケージのダウンロード~PowerShellの環境設定までを実施する

Windows版Pythonのインストール

2022.1時点ではpythonのバージョン3.9.9が利用し易そうである。
この場合は、以下のダウンロードリンクからインストーラ(.exe)を取得するとよい。

非公式Pythonダウンロードリンク
python-3.9.9-amd64.exe

特に以下の点を忘れずに実施する。

"Add Python 3.x to PATH" をチェックするのを忘れないようにしてください。
もし忘れたら、あわてず落ち着いてもう一度インストールしましょう。何度でも繰り返して大丈夫です。
PowerShellの環境設定
PowerShellでスクリプトの実行を許可しておきます。
スタートメニューで Windows PowerShell | Windows PowerShell を起動し、次のコマンドを実行します。
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

powershell上で以下を実行して結果が表示されればOK

python --version
## ex.) Python 3.9.9 等と出力されればOK

参考

git Downloading Git
Windows 10 と Powershell(WSL含む) で git を利用する
Windows版Pythonのインストール
非公式Pythonダウンロードリンク
WindowsPowerShellでPythonを利用する
GNU Emacs for Windows再入門
visual studio codeをinstall
WindowsにBashをインストールする方法
Windows Subsystem for Linuxが表示されない

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?