How to check python version and the installation path of the package pip points to?

pip -V in the terminal, and you can view the installation path and the attributable Python interpreter version from the following results.

➤  pip3 -V
pip 21.2.4 from /opt/homebrew/lib/python3.8/site-packages/pip (python 3.8)

The output above says
The third-party package will be installed in /opt/homebrew/lib/python3.8/site-packages , and the corresponding Python interpreter is python3.8

─➤  pip -V
pip 21.2.3 from /Users/bot/.local/share/virtualenvs/zjwt_service-uCytniMn/lib/python3.10/site-packages/pip (python 3.10)
➤  pip3.9 -V
pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)

Reference article:
View all python environments in the computer


universe_king
3.4k 声望680 粉丝