Home > other >  About python installed opencv - python library error, but install other libraries (such as: flask) w
About python installed opencv - python library error, but install other libraries (such as: flask) w

Time:11-20

 a1 @ Macintosh ~ % pip3 install opencv - python 
DEPRECATION: Python 2.7 reached the end of its life on January 1 st, 2020. Both Please upgrade your Python as Python 2.7 is no longer maintained. The PIP 21.0 will drop support for Python 2.7 in January 2021. More details about the Python 2 support in PIP can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to the user the installation because normal site - packages is not writeable
& in the indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting opencv - python
Downloading https://mirrors.aliyun.com/pypi/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz (88.0 MB)
| | 88.0 MB 5.1 MB/s
Installing the build dependencies... The done
Getting the requirements to build the wheel... The error
ERROR: the Command errored out with the exit status 1:
Command:/System/Library/Frameworks/Python framework Versions/2.7/Resources/Python. The app/Contents/MacOS/Python/Library/Python/2.7/site - packages/PIP - 20.2.2 - py2.7. An egg/PIP/_vendor/pep517/_in_process py get_requires_for_build_wheel/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/tmpI11i93
CWD:/private/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/PIP - install - Fu0fOp/opencv - python
Complete the output lines (22) :
Traceback (the most recent call last) :
The File "/Library/Python/2.7/site - packages/PIP - 20.2.2 - py2.7. An egg/PIP/_vendor/pep517/_in_process py", line 280, in & lt; module>
The main ()
The File "/Library/Python/2.7/site - packages/PIP - 20.2.2 - py2.7. An egg/PIP/_vendor/pep517/_in_process py", line 263, the main in
Json_out [' return_val]=hook (* * hook_input [' kwargs'])
The File "/Library/Python/2.7/site - packages/PIP - 20.2.2 - py2.7. An egg/PIP/_vendor/pep517/_in_process py", line 114, in get_requires_for_build_wheel
Return the hooks (config_settings)
The File "/private/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/PIP - build - env - sPQZ2X/overlay/lib/python2.7/site - packages/setuptools/build_meta. Py", line 146, in get_requires_for_build_wheel
Return the self. _get_build_requires (config_settings, requirements=[' wheel '])
The File "/private/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/PIP - build - env - sPQZ2X/overlay/lib/python2.7/site - packages/setuptools/build_meta. Py", line 127, in _get_build_requires
Self. Run_setup ()
The File "/private/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/PIP - build - env - sPQZ2X/overlay/lib/python2.7/site - packages/setuptools/build_meta. Py", line 243, in run_setup
The self). Run_setup (setup_script=setup_script)
The File "/private/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/PIP - build - env - sPQZ2X/overlay/lib/python2.7/site - packages/setuptools/build_meta. Py", line 142, in run_setup
Exec (the compile (code, a __file__ 'exec), locals ())
The File "setup. Py", line 448, in & lt; module>
The main ()
The File "setup. Py", line 99, in the main
% {" ext ": re. Escape (sysconfig. Get_config_var (" EXT_SUFFIX")}
The File "/System/Library/Frameworks/Python framework Versions/2.7/lib/python2.7/re. Py", line 210, in the escape
S=list (pattern)
TypeError: 'NoneType' object is not iterable
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
ERROR: the Command errored out with the exit status: 1/System/Library/Frameworks/Python framework Versions/2.7/Resources/Python. The app/Contents/MacOS/Python/Library/Python/2.7/site - packages/PIP - 20.2.2 - py2.7. An egg/PIP/_vendor/pep517/_in_process py get_requires_for_build_wheel/var/folders/9 f/0 zttwvx11l94ymkzbb8zqpvw0000gn/T/tmpI11i93 Check the logs for full Command output.

Why do I install the opencv - python library complains, but I install other libraries (such as: flask) is not it?

CodePudding user response:

Why is your pip3 run in 2.7? Opencv is no longer support python2

CodePudding user response:

I don't know ~ do you know how to change?

CodePudding user response:

Python 2.7 reached the end of its life on January 1 st, 2020. Both Please upgrade your Python as Python 2.7 is no longer maintained.
The effect that python2.7 not in maintenance, call you download python3, you unloaded the python now reshipment

CodePudding user response:

I install python 3.7, and according to the reasonable pip3 should be running python3, isn't it?

CodePudding user response:

Need to configure the PIP defaults to using python version
https://jingyan.baidu.com/article/a17d5285daf7398099c8f251.html
  • Related