Pycharm/Python OpenCV and CV2 install error

前端 未结 16 1754
萌比男神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:55

    here is a tutorial that worked for me without any problem.

    Copied from the site above the important part:

    Download the OpenCV version corresponding to your Python installation from here. In my case, I’ve used opencv_python-3.1.0-cp35-cp35m-win32.whl.

    Now, open a cmd window like before. You can open this directly in your Downloads folder if you SHIFT and right click inside it. The idea is to open a cmd window where you’ve downloaded the above [...] file. Use the [...] command to install [...] OpenCV:

    1     pip install "opencv_python-3.1.0-cp35-cp35m-win32.whl"
    

    Additional note: don't forget to change the name of the downloaded file in the command you use. Apparently by installing opencv, you'll have access to cv2 too.

提交回复
热议问题