python - 在 Mac OS X 上运行 "python"和 "python2.7"有什么区别?

标签 python macos

当我从 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 中的 scipynumpy,但不能识别普通的 python。

它们之间到底有什么区别?有什么办法可以让 python import scipy 吗?我可以只将 python2.7 别名为 python 而忘记这个吗?

最佳答案

这是两个不同的 python

尝试whereis pythonwhereis python2.7获取它们的具体位置。

关于python - 在 Mac OS X 上运行 "python"和 "python2.7"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18069753/

相关文章:

Python - 获取列表列表中每个列表的最后一个元素

python - 查找 DNA 字符串中最常见的不匹配 k 聚体

python - 词典词典: Sorting by a specific key

python - 访问 Shapely MultiPoint 中的各个点

Python + Django : Trouble with setting up mkvirtualenv on macOS

macos - .bash_profile 和脚本作为符号链接(symbolic link)

c - 升级到Mojave后,无法在Mac上编译C程序

python - 无法通过 OpenCV python 打开 Mac 网络摄像头

xcode - 使用导入的框架构建 Mac OS X/Cocoa 应用程序以进行分发

linux - 通过 sendto() 的 UDP 广播返回 "Can' t assign requested address"on OS/X but not Linux