Mac终端查看python默认安装路径
1.输⼊ which + python版本号如下:
which python3.10
2.展⽰默认路径为:
/usr/local/bin/python3.10
#查看当前所有Python版本路径
appledeMBP:~ apple$ which python2.7
/usr/local/bin/python2.7
appledeMBP:~ apple$ which python3.5
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
appledeMBP:~ apple$ which python3.7
/
usr/local/bin/python3.7
redis基本类型appledeMBP:~ apple$ which python
/usr/local/bin/python
appledeMBP:~ apple$ which python3
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
appledeMBP:~ apple$ which python2
/usr/local/bin/python2
下⾯的随意看看就⾏,都是旧版本了
#查看当前Python版本
appledeMBP:~ apple$ python --version
Python 3.5.1
用rank函数排序
查看Python路径
appledeMBP:~ apple$ which python
/usr/local/bin/python
查看全部Python路径
python安装教程mac
appledeMBP:~ apple$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public
查看Python3路径
appledeMBP:~ apple$ which python3
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3evermotion模型库
appledeMBP:~ apple$
软件测试sql难不难查看pip2版本
appledeMBP:~ apple$ pip2 --version
pip 18.0 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
查看pip3版本
appledeMBP:~ apple$ pip3 --version
pip 18.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip (python 3.5)
查看python版本
appledeMBP:~ apple$ python --version
Python 3.5.1
查看Python3版本
appledeMBP:~ apple$ python3 --version
Python 3.5.1
appledeMBP:~ apple$
下⾯是⽹友总结的:
Mac系统⾃带python路径为/System/Library/Frameworks/Python.framework/Version
这⾥可能会有多个python版本,⾥⾯Current存放系统当前python版本,进⼊Current/bin,
springer link怎么下载文献
在终端输⼊./python --version即可查看系统当前python版本
(注:若使⽤python --version命令是查看⽤户当前python版本⽽不是系统python版本)
HomeBrew安装python路径为/usr/local/Cellar/python⾥⾯存放HomeBrew所安装版本,
进⼊2.7.13/bin,在终端输⼊./python --version即可查看⽤户当前使⽤的python版本。
如果使⽤brew⼯具正确安装python的情况下,⽤户当前python版本会是新安装的python
系统命令默认路径在/usr/bin,⽤户命令默认路径在/usr/local/bin(brew安装的命令默认在这个路径下)。
如果存在相同的命令,则会依据/etc/paths⽂件中的环境变量顺序(前⾯优先于后⾯)依次查,查看环境变量也可以在终端输⼊echo $PATH查看,遵循左⾯路径优先于右⾯路径。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。