I can't import modules in pycharm. When I wanted to import cv2 for example, I get this error:
Please can somebody help me. I tried all other solutions but they did not help
You should write this in terminal or cmd and than try:
pip install opencv-python
here is more info: How to import cv2 in python3?
From the image you uploaded it seems like you are using a virtual environment. If that was intended make sure you have installed opencv in your environment. Otherwise you can change the interpreter for the project by going to:
"File" --> "Settings" --> "Project: project_name" --> "Project Interpreter"
From there you can change or add an interpreter and see what packages are attached to the interpreter. See example below:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.