LoginSignup
1
1

More than 3 years have passed since last update.

Pythonとpipの素性を知りたい

Last updated at Posted at 2020-10-11

MacやLinuxでPythonを触る時はバージョンが混在していることが多く結構困る。触っているPythonやpipがどこのフォルダにあるものかを調べるためのコマンド

Pythonの場所

terminal
which python
which python3
which python2

で確認する

出力結果

output
/usr/local/bin/python

他の方法

terminal他の方法
type python
where python

でも行けました。@shiracamus様、コメントありがとうございます!

pipの場所

terminal
pip -V
pip3 -V

で確認する

出力結果

output
pip 20.2.3 from /home/myName/.linuxbrew/opt/python@3.8/lib/python3.8/site-packages/pip (python 3.8)

Windowsだと困ったことない。

1
1
1

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
1
1