【发布时间】:2020-09-08 03:34:40
【问题描述】:
我是 python 新手。最近,我想在我的 macOS 上安装 numpy。我已经安装了brew、python 和pip。另外,我将pip pip3 和python 别名为python3。但是,当我运行 pip install numpy 时,它会显示一个错误。
我也很困惑,由于别名的原因,我应该使用pip3 来安装numpy。但是为什么警告是关于 python2.7 的呢?
➜ ~ which python
python: aliased to /usr/local/bin/python3.6
➜ ~ which pip
pip: aliased to /usr/local/bin/pip3
➜ ~ pip install numpy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1)
【问题讨论】:
标签: python python-3.x python-2.7 numpy pip