1 报错“SyntaxError: future feature annotations is not defined”
SyntaxError: future feature annotations is not defined
报错信息:
File "predict.py", line 9, in <module>
from PIL import Image
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/home/nvidia/.local/lib/python3.6/site-packages/Pillow-9.2.0-py3.6-linux-aarch64.egg/PIL/Image.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 894, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
File "<frozen importlib._bootstrap_external>", line 1131, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1112, in _legacy_get_spec
File "<frozen importlib._bootstrap>", line 441, in spec_from_loader
File "<frozen importlib._bootstrap_external>", line 544, in spec_from_file_location
File "/home/nvidia/.local/lib/python3.6/site-packages/Pillow-9.2.0-py3.6-linux-aarch64.egg/PIL/_deprecate.py", line 1
SyntaxError: future feature annotations is not defined
是python版本和pillow的版本不匹配导致
原环境:python==3.6+pillow==9.2.0
对pillow降级变为pillow==8.4.0解决
2 protobuf requires Python ‘>=3.7‘ but the running Python is 3.6.5的解决方法
更新命令:python -m pip install --upgrade pip
3 安装opencv-python的时候报错 no module named skbuild的解决办法
安装 scikit-build
pip3 install scikit-build