EDIT- Things I tried
Then I entered the new interpreter and added opencv-python
(plus sign > searched for this > Install package):
After that I made a short script that needs cv2
. Pycharm couldn't import cv2, but the script runs correctly (displays the image) when "run" is pressed.
If I switch interpreter to the regular one it recognizes the cv2 methods and autocomplete me.
CodePudding user response:
I solved it using anaconda
.
The first time I tried it didn't work, so it's probably a problem with having non-ascii username (again). I had the .conda
folder in a path which contained non-ascii, as well as the anaconda3 itself installed in a different place
To install it correctly:
- Uninstall both anaconda, pycharm (uninstall other pythons if you have them).
2. Create a new user with ascii only (e.g. Ben). In this user: