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
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。