相关疑难解决方法(0)

`which python` 指向我想要的 python,但是 `python` 运行的版本错误

我想使用ports提供的python24,所以安装了,python_select -s显示确实选择了我想要的版本。跑步which python给了/opt/local/bin/python,跑步/opt/local/bin/python给了我想要的版本。但是,当我python从 shell运行时,我得到的是/usr/bin/python版本。我没有 python 别名。

简而言之,情况如下:

  1. 我相信路径设置合理,并且which python似乎证实了这一点。
  2. alias 只返回 1 个条目,这与此无关。

然而,python从 bash shell运行给了我错误的 python!

我有点难住了!我在看什么?

shell python macports which macos

7
推荐指数
1
解决办法
3230
查看次数

标签 统计

macos ×1

macports ×1

python ×1

shell ×1

which ×1