问题
I am python newbie. I am doing 1 project testing of Keras. I already installed opencv
by pip install opencv-python
but i can't find opencv
in interpreter
of Pycharm
and have an error when i import cv2
. My interpreter is usr/bin/python2.7
回答1:
Go to project interpreter settings in preferences in Pycharm, and use the + sign there to add the module to your interpreter.
This can happen when pip is installing to a directory that is not part of your project's python interpreter's PATH.
Installing via the Pycharm preferences menu always solves for me, although there is a deeper issue of pip not installing to the correct directory...
来源:https://stackoverflow.com/questions/48314549/i-have-trouble-with-interpreter-in-pycharm