Execute the following command:
import cv2
File "/appletree/miniconda3/envs/yyp_pytorch/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Reason: libGL.so.1 is missing.
Solution:
execute the following command after pip install opencv-python
pip install opencv-python-headless
Read More:
- [Solved] import mxnet Error: OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory
- error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
- ./popins2: error while loading shared libraries: libbifrost.so: cannot open shared object file: No such file or directory
- [Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: cannot open shared object file: No such file or directory
- [Solved] error while loading shared libraries: libopencv_highgui.so.3.4: cannot open shared object file…
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] ERROR: Could not open requirements file: [Errno 2] No such file or directory : ‘requirments.txt‘
- [Solved] open failed: ENOENT (No such file or directory)
- Keil Compile Error: ..\OBJ\USART.axf: error: L6002U: Could not open file ..\obj\sys.o: No such file or directory
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- [Samtools] Run error: error while loading shared libraries: libcrypto.so.1.0.0 or libncurses.so.5 or libtinfow.so.5
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- Centos pip install uwsgi error: “fatal error: Python.h: No such file or directory”
- [Solved] Error executing Jupyter command ‘notebook‘: [Errno 2] No such file or directory
- ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.23‘ not found
- [Solved] MSYS2+ fatal error: zlib.h: There is no such file or directory
- [Solved] utils.c:33:18: fatal error: zlib.h: No such file or directory
- C++: fatal error: variant: No such file or directory