-
Notifications
You must be signed in to change notification settings - Fork 946
Description
I use the Ubuntu16.04,when I use: pip install opencv-python
Collecting opencv-python
Using cached https://files.pythonhosted.org/packages/01/9b/be08992293fb21faf35ab98e06924d7407fcfca89d89c5de65442631556a/opencv-python-4.5.3.56.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-PbSews/opencv-python/setup.py", line 10, in
import skbuild
File "/home/robot403/.local/lib/python2.7/site-packages/skbuild/init.py", line 9, in
from .setuptools_wrap import setup # noqa: F401
File "/home/robot403/.local/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 22, in
from packaging.requirements import Requirement
File "/home/robot403/.local/lib/python2.7/site-packages/packaging/requirements.py", line 100
def init(self, requirement_string: str) -> None:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PbSews/opencv-python/
So I use : pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/00/5f/d6959d6f25f202e3e68e3a53b815af42d770c829c19382d0acbf2c3e2112/pip-21.3.tar.gz (1.7MB)
100% |████████████████████████████████| 1.7MB 654kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-KAHYxM/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-KAHYxM/pip/
This why?