12
20

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.

[Python Windows] Pythonバージョンを指定してpip install

Last updated at Posted at 2020-12-24
  • Windows の Python ランチャを利用

インストールされているPythonのバージョン確認

  • * がついているバージョンがデフォルトバージョン
C:\Users>py --list
Installed Pythons found by py Launcher for Windows
 -3.8-64 *
 -3.6-64
 -2.7-64
  • ※ 各バージョンのpython.exeのパスを知りたい場合は、--list--list-paths にする
C:\Users>py --list-paths
Installed Pythons found by py Launcher for Windows
 -3.8-64        C:\Users\username\AppData\Local\Programs\Python\Python38\python.exe *
 -3.6-64        C:\Users\username\AppData\Local\Programs\Python\Python36\python.exe
 -2.7-64        C:\Python27\python.exe

バージョンを指定してPip Install

# バージョン3.6のPythonにsklearnをインストール
py -3.6 -m pip install sklearn
# バージョン指定した場合
py -3.6 -m pip install sklearn==0.22

# ※ Uninstall時
py -3.6 -m pip uninstall sklearn

Reference

12
20
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
12
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?