Ask coding questions

← Back to all posts
How To Import CV2
LoveTheBears1O1 (5)

Does anyone know how to import cv2 into Python on repl.it? I can’t find any module named cv, cv2, or opencv-python, and creating a requirements.txt file shows an error.

Is there any way to do this?

Answered by PattanAhmed (1397) [earned 5 cycles]
View Answer
Comments
hotnewtop
PattanAhmed (1397)

@LoveTheBears1O1 Hi,
To import, use this command
Code:-

import opencv-python

That's it.
Thanks!

Hope this helps

CodingCactus (4191)

I have moved this to the ask board as it is a question and not a jam submission.

hg0428 (192)

This is not the right section to put a question like this. Put it in the ask section. Why did you put it in the jam section?

LoveTheBears1O1 (5)

@hg0428 This is in the ask section.

LoveTheBears1O1 (5)

@hg0428 oh oops i must have clicked the wrong category! Thanks for moving it @CodingCactus

LoveTheBears1O1 (5)

EDIT: import opencv-python worked :)