I have trouble with Interpreter in Pycharm

微笑、不失礼 提交于 2019-12-25 10:06:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!