Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Why can't the Python interpreter find the opencv installed in the virtual environment?

$
0
0

My python version in my virtual environment is 3.9.18.This is the code running on the terminal,OEM is the name of my virtual environment.

(base) PS F:\OEM-Fewshot-Challenge\OEM-Fewshot-Challenge\src> conda activate OEM(OEM) PS F:\OEM-Fewshot-Challenge\OEM-Fewshot-Challenge\src> py test.pyTraceback (most recent call last):  File "F:\OEM-Fewshot-Challenge\OEM-Fewshot-Challenge\src\test.py", line 2, in <module>    import cv2ModuleNotFoundError: No module named 'cv2'

I'm pretty sure I had installed the opencv library in my virtual environment.I check it again and run the test.py but the error still remain.

(OEM) PS F:\OEM-Fewshot-Challenge\OEM-Fewshot-Challenge\src> pip list | findstr opencvopencv-python               4.6.0.66

Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>