1 ~$: pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
2 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 pip 21.0 will remove support for this functionality.
3 Defaulting to user installation because normal site-packages is not writeable4 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
5 Collecting opencv-python6 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz (88.0 MB)
7 Installing build dependencies ... done
8 Getting requirements to build wheel ... error9 ERROR: Command errored out with exit status 1:10 command: /usr/bin/python /home/litterboy/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp8E6IcN11 cwd: /tmp/pip-install-SI_wRI/opencv-python12 Complete output (22lines):13 Traceback (most recent call last):14 File "/home/litterboy/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in
15 main()16 File "/home/litterboy/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, inmain17 json_out['return_val'] = hook(**hook_input['kwargs'])18 File "/home/litterboy/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, inget_requires_for_build_wheel19 return hook(config_settings)20 File "/tmp/pip-build-env-FfK60X/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 146, inget_requires_for_build_wheel21 return self._get_build_requires(config_settings, requirements=['wheel'])22 File "/tmp/pip-build-env-FfK60X/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 127, in_get_build_requires23 self.run_setup()24 File "/tmp/pip-build-env-FfK60X/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 243, inrun_setup25 self).run_setup(setup_script=setup_script)26 File "/tmp/pip-build-env-FfK60X/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 142, inrun_setup27 exec(compile(code, __file__, 'exec'), locals())28 File "setup.py", line 448, in
29 main()30 File "setup.py", line 99, inmain31 % {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}32 File "/usr/lib/python2.7/re.py", line 210, inescape33 s =list(pattern)34 TypeError: 'NoneType' objectis not iterable35 ----------------------------------------
36 ERROR: Command errored out with exit status 1: /usr/bin/python /home/litterboy/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp8E6IcN Check the logs for full command output.