回到顶部

阅读目录

ERROR: Could not build wheels for opencv-python-headless, which is required to install pyproject.toml-based projects

错误日志

pip 安装 ddddocr 模块报错

pip install ddddocr
...
  ERROR: Failed building wheel for opencv-python-headless
Failed to build opencv-python-headless
ERROR: Could not build wheels for opencv-python-headless, which is required to install pyproject.toml-based projects

报错原因

opencv-python-headless 模块安装不上

解决办法

我们直接使用 whl 文件离线安装方法

去 pypi( opencv-python-headless · PyPI) 官网下载对应版本的 whl

我的环境是 py3.6.8 win 64 位,所以我下载的是红框中的

安装过程:

(work_py) E:\>pip install E:\downloads\opencv_python_headless-3.4.18.65-cp36-abi3-win_amd64.whl
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing e:\downloads\opencv_python_headless-3.4.18.65-cp36-abi3-win_amd64.whl
Requirement already satisfied: numpy>=1.13.3 in e:\py_envs\work_py\lib\site-packages (from opencv-python-headless==3.4.18.65) (1.19.5)
Installing collected packages: opencv-python-headless
Successfully installed opencv-python-headless-3.4.18.65

(work_py) E:\>pip install ddddocr
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting ddddocr
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2b/03/cd7a1998cc435322956c8368bd621176ea50e4e6cbb778b3ba24d19fef8f/ddddocr-1.4.7-py3-none-any.whl (75.9 MB)
Requirement already satisfied: opencv-python-headless in e:\py_envs\work_py\lib\site-packages (from ddddocr) (3.4.18.65)
Requirement already satisfied: Pillow in e:\py_envs\work_py\lib\site-packages (from ddddocr) (8.4.0)
Requirement already satisfied: numpy in e:\py_envs\work_py\lib\site-packages (from ddddocr) (1.19.5)
Collecting onnxruntime
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/57/62/544bd705f3a7d0a24a66747680d95dc78050cdce613ced19c676c4ff4019/onnxruntime-1.10.0-cp36-cp36m-win_amd64.whl (5.2 MB)
Collecting protobuf
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/98/f4/b21be85a824309351356c9a229cf9614d521620e26202a36d5fff2353c37/protobuf-3.19.6-cp36-cp36m-win_amd64.whl (897 kB)
Collecting flatbuffers
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/90/49/3154215b3d8a7acd8c07908eb7132399232fe6a5a79137c4924e712b8eca/flatbuffers-23.1.21-py2.py3-none-any.whl (26 kB)
Installing collected packages: protobuf, flatbuffers, onnxruntime, ddddocr
Successfully installed ddddocr-1.4.7 flatbuffers-23.1.21 onnxruntime-1.10.0 protobuf-3.19.6

 


^_^
请喝咖啡 ×

文章部分资料可能来源于网络,如有侵权请告知删除。谢谢!

前一篇: 无头浏览器 phantomjs 官方下载链接
下一篇: selenium 模拟滑块验证码