Pycharm/Python OpenCV and CV2 install error

前端 未结 16 1773
萌比男神i
萌比男神i 2020-12-24 00:23

I\'ve been trying to install both OpenCV and cv2 from both Pycharm and from the terminal as suggested using:

pip install --user opencv
pip install --user cv2         


        
16条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-24 00:49

    You are getting those errors because opencv and cv2 are not the python package names.

    These are both included as part of the opencv-python package available to install from pip.

    If you are using python 2 you can install with pip:

     pip install opencv-python
    

    Or use the equivilent for python 3:

    pip3 install opencv-python
    

    After running the appropriate pip command your package should be available to use from python.

提交回复
热议问题