https://www.jb51.net/article/171335.htm
$ pip install numpy -i https://pypi.douban.com/simple
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
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. A future version of pip will drop support for Python 2.7. 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
Looking in indexes: https://pypi.douban.com/simple
Collecting numpy
Downloading https://pypi.doubanio.com/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip (5.4 MB)
|████████████████████████████████| 5.4 MB 848 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpn5WZkx
cwd: /tmp/pip-install-LcWsEa/numpy
Complete output (10 lines):
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 257, in
main()
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 85, in get_requires_for_build_wheel
backend = _build_backend()
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 76, in _build_backend
obj = getattr(obj, path_part)
AttributeError: 'module' object has no attribute '__legacy__'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpn5WZkx Check the logs for full command output.
$ pip3 install numpy -i https://pypi.douban.com/simple
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
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. A future version of pip will drop support for Python 2.7. 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
Looking in indexes: https://pypi.douban.com/simple
Collecting numpy
Using cached https://pypi.doubanio.com/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip (5.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmprNtkea
cwd: /tmp/pip-install-DJCzdw/numpy
Complete output (10 lines):
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 257, in
main()
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 85, in get_requires_for_build_wheel
backend = _build_backend()
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 76, in _build_backend
obj = getattr(obj, path_part)
AttributeError: 'module' object has no attribute '__legacy__'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmprNtkea Check the logs for full command output.
$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
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. A future version of pip will drop support for Python 2.7. 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
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3a/5f/47e578b3ae79e2624e205445ab77a1848acdaa2929a00eeef6b16eaaeb20/numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl (17.0 MB)
|████████████████████████████████| 17.0 MB 92 kB/s
Installing collected packages: numpy
Successfully installed numpy-1.16.6
$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U scipy
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
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. A future version of pip will drop support for Python 2.7. 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
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting scipy
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/24/40/11b12af7f322c1e20446c037c47344d89bab4922b8859419d82cf56d796d/scipy-1.2.3-cp27-cp27mu-manylinux1_x86_64.whl (24.8 MB)
|████████████████████████████████| 24.8 MB 1.6 MB/s
Requirement already satisfied, skipping upgrade: numpy>=1.8.2 in ./.local/lib/python2.7/site-packages (from scipy) (1.16.6)
Installing collected packages: scipy
Successfully installed scipy-1.2.3
$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
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. A future version of pip will drop support for Python 2.7. 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
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting matplotlib
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9d/40/5ba7d4a3f80d39d409f21899972596bf62c8606f1406a825029649eaa439/matplotlib-2.2.5-cp27-cp27mu-manylinux1_x86_64.whl (12.8 MB)
|████████████████████████████████| 12.8 MB 1.4 MB/s
Collecting python-dateutil>=2.1
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 6.9 MB/s
Collecting backports.functools-lru-cache
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/da/d1/080d2bb13773803648281a49e3918f65b31b7beebf009887a529357fd44a/backports.functools_lru_cache-1.6.1-py2.py3-none-any.whl (5.7 kB)
Requirement already satisfied: numpy>=1.7.1 in ./.local/lib/python2.7/site-packages (from matplotlib) (1.16.6)
Requirement already satisfied: six>=1.10 in /usr/lib/python2.7/dist-packages (from matplotlib) (1.10.0)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5d/bc/1e58593167fade7b544bfe9502a26dc860940a79ab306e651e7f13be68c2/pyparsing-2.4.6-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 431 kB/s
Collecting cycler>=0.10
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting kiwisolver>=1.0.1
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3d/78/cb9248b2289ec31e301137cedbe4ca503a74ca87f88cdbfd2f8be52323bf/kiwisolver-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl (93 kB)
|████████████████████████████████| 93 kB 262 kB/s
Requirement already satisfied: pytz in /usr/local/lib/python2.7/dist-packages (from matplotlib) (2018.3)
Collecting subprocess32
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz (97 kB)
|████████████████████████████████| 97 kB 553 kB/s
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from kiwisolver>=1.0.1->matplotlib) (38.5.1)
Building wheels for collected packages: subprocess32
Building wheel for subprocess32 (setup.py) ... done
Created wheel for subprocess32: filename=subprocess32-3.5.4-cp27-cp27mu-linux_x86_64.whl size=45412 sha256=6d9c23749a9618b46a87899bde2a221f3db5c29e85b4f85ed0cf240513794b29
Stored in directory: /home/piggie/.cache/pip/wheels/e9/69/0e/9f40a69e58a723276ba487113220580610b4d99506c6965aaf
Successfully built subprocess32
Installing collected packages: python-dateutil, backports.functools-lru-cache, pyparsing, cycler, kiwisolver, subprocess32, matplotlib
Successfully installed backports.functools-lru-cache-1.6.1 cycler-0.10.0 kiwisolver-1.1.0 matplotlib-2.2.5 pyparsing-2.4.6 python-dateutil-2.8.1 subprocess32-3.5.4