1 個回答
- 最新
- 最多得票
- 最多評論
1
To import OpenCV in a Python SageMaker notebook, you can follow these steps:
Install the
opencv-python-headless
package instead of the regular
opencv-python
package. This headless version of OpenCV does not require additional GUI libraries, which can cause issues in a SageMaker notebook environment.
%pip install opencv-python-headless
After installing the package, you should be able to import cv2 without any issues
相關內容
- 已提問 4 個月前
- 已提問 3 年前
- 已提問 2 年前

Agree with this but the formatting is a bit off: I think you want your triple-backticks around
%pip install opencv-python-headlessrather than the preceding block :D