安装opencv
【Failed to build opencv-contrib-python
ERROR: Could not build wheels for opencv-contrib-python which use PEP 517 and cannot be installed directly 】
解决方案:
1、升级pip工具包:
pip install --upgrade pip setuptools wheel
2、重试安装:
pip install opencv-python
如果出现“Script file ‘D:\Anaconda\Scripts\pip-script.py’ is not present.”
因为在使用 pip install --ugrade pip 命令升级的时候,会先将原来的 pip 卸载掉再安装新版本的 pip,但是在成功卸载之后,由于权限的问题无法安装新版本 pip ,所以 pip 就没法使用了。
解决方法:
1、curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 下载安装脚本
2、python get-pip.py # 运行安装脚本