描述报错:ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
解决方案:
python -m pip install --upgrade pip
还遇到:
WARNING: The script f2py.exe is installed in 'C:\Users\89890\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
解决方案:就是说这个'C:\Users\89890\AppData\Roaming\Python\Python38\Scripts'路径没有写到path里,如果不处理很有可能导入不了包。
右键单击我的电脑,点击属性。高级系统设置-环境变量-系统变量-PATH-编辑-新建-添加上面路径。
就大功告成了。