为什么运行脚本时$(哪个python3)不是默认的python3?

时间:2017-09-15 10:18:07

标签: python bash macos shell

似乎默认执行的python3是库存,而which python3显示通过macport安装的库存。

$ which python3
/opt/local/bin/python3

python3 -c 'import sys;print(sys.executable)'
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
$ $(which python3) -c 'import sys;print(sys.executable)'
/opt/local/bin/python3

$ echo $PATH
/Users/jack/.nvm/versions/node/v8.4.0/bin:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jack/.yarn/bin:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.5/bin

为什么我得到这个奇怪的东西?

0 个答案:

没有答案