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?

PowerShellでPythonコマンドが実行できない時の対処法

Posted at

こんにちは、zawato(zawato7)です。

今日も今日とて、エラーを解決していきますか。

問題事象:PowerShellでPythonコマンドが実行できない

環境

  • Windows 11

問題事象

Pythonはインストール済み。

PowerShellで「python –version」と入力すると、「Python」と表示され、インストールしてあるPythonのバージョンが表示されない。

ed2af3a862604c479378ec5732787be9-2-1024x526.png

おそらくpythonコマンドが機能していないと思われる。

対処法:Pythonを再インストール

まずは、既にインストールされているPythonをアンインストールします。

スタートボタンから「設定」→「アプリ」を開きます。

インストールされているアプリの検索窓に「python」と入力すると、インストール済みのPythonの一覧が表示されます。

79512d91a367703566d4592728d4e8c0-1024x330.png

「・・・」からアンインストールをクリックし、Pythonをアンインストールします。

再度、PowerShellで「python」コマンドを実行すると、Microsoft Storeが開き、Pythonが表示されるので、インストールします。

Pythonのインストールが完了したら、PowerShellで「python –version」コマンドを実行します。

新しくインストールしたPythonのバージョンが表示され、pythonコマンドが実行できるようになりました!

おわりに

参考になれば嬉しいです!!!

また、似たようなエラーや他の対処法などがあればコメントください!!!

ここまで読んでいただけた方はいいねとストックよろしくお願いします。
@zawato をフォローいただけると励みになります。

データサイエンス・プログラミング・IT資格に関するブログも書いているので、チェックしてみてください!↓

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?