所有这些 python* 可执行文件是怎么回事?
What's with all those python* executables?
虽然我使用的是安装了 MacPorts 的 Mac,但我想这个问题也适用于其他平台。
当我在 $PATH 中列出所有带有 "python" 前缀的可执行文件时,我得到了一堆结果:
//64-bit Mac Mini @work/
$ IFS=:
//64-bit Mac Mini @work/
$ find $PATH -name python\*
/opt/local/bin/python3
/opt/local/bin/python3m-config
/opt/local/bin/python3.7-config
/opt/local/bin/python2.7-config
/opt/local/bin/python3.7m
/opt/local/bin/pythonw2.7
/opt/local/bin/python3.7m-config
/opt/local/bin/python3.7
/opt/local/bin/python3-config
/opt/local/bin/python2.7
/opt/local/bin/python3m
/usr/bin/python
/usr/bin/pythonw
/usr/bin/python2.7-config
/usr/bin/pythonw2.7
/usr/bin/python-config
/usr/bin/python2.7
我知道 python[23]* 是什么,但是 python3.7m, python3m, pythonw, pythonw2 是什么.7 和那些 python*-config 呢?
更新
感谢您指出可能重复的评论。然而,这并没有完全解决我的问题,因为它没有提到 python2.7 解释器上的 "w" 标志,也没有提到那些 *-config 程序的功能。
existing question 的回答解决了我的大部分困惑。
后缀字母表示"ABI version"具体构建的CPython实现,具体可以看一下this GitHub commit
至于2.x版本中的'w'标志,在手册页中都有解释:
pythonw -- run python script allowing GUI
...
Actually, since Python 2.5, the normal python also allows GUI access, so python and pythonw are now interchangeable.
也可以在 Bytes.com
上找到相关讨论
python*-config 程序用于构建使用python 的程序,它有点像"pkg-config" 应用程序,专用于python。
虽然我使用的是安装了 MacPorts 的 Mac,但我想这个问题也适用于其他平台。
当我在 $PATH 中列出所有带有 "python" 前缀的可执行文件时,我得到了一堆结果:
//64-bit Mac Mini @work/
$ IFS=:
//64-bit Mac Mini @work/
$ find $PATH -name python\*
/opt/local/bin/python3
/opt/local/bin/python3m-config
/opt/local/bin/python3.7-config
/opt/local/bin/python2.7-config
/opt/local/bin/python3.7m
/opt/local/bin/pythonw2.7
/opt/local/bin/python3.7m-config
/opt/local/bin/python3.7
/opt/local/bin/python3-config
/opt/local/bin/python2.7
/opt/local/bin/python3m
/usr/bin/python
/usr/bin/pythonw
/usr/bin/python2.7-config
/usr/bin/pythonw2.7
/usr/bin/python-config
/usr/bin/python2.7
我知道 python[23]* 是什么,但是 python3.7m, python3m, pythonw, pythonw2 是什么.7 和那些 python*-config 呢?
更新
感谢您指出可能重复的评论。然而,这并没有完全解决我的问题,因为它没有提到 python2.7 解释器上的 "w" 标志,也没有提到那些 *-config 程序的功能。
existing question 的回答解决了我的大部分困惑。
后缀字母表示"ABI version"具体构建的CPython实现,具体可以看一下this GitHub commit
至于2.x版本中的'w'标志,在手册页中都有解释:
pythonw -- run python script allowing GUI
...
Actually, since Python 2.5, the normal python also allows GUI access, so python and pythonw are now interchangeable.
也可以在 Bytes.com
上找到相关讨论python*-config 程序用于构建使用python 的程序,它有点像"pkg-config" 应用程序,专用于python。