当我从 Mac 上的终端运行 python
时,我得到以下前两行:
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
当我运行 python2.7
时,我得到了这个:
Python 2.7.5 (default, May 19 2013, 13:26:46)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
我可以识别 python2.7 中的 scipy
和 numpy
,但不能识别普通的 python。
它们之间到底有什么区别?有什么办法可以让 python import scipy
吗?我可以只将 python2.7 别名为 python 而忘记这个吗?
最佳答案
这是两个不同的 python
。
尝试whereis python
和whereis python2.7
获取它们的具体位置。
关于python - 在 Mac OS X 上运行 "python"和 "python2.7"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18069753/