简体   繁体   中英

How to install openCV on python3 file rather than python2.7?

I find there is only python2.7 folder in ~/.local/lib (see below). When I use openCV, I must use python **.py . But I want to us python3 **.py to us openCV.

How can I do it?

在此处输入图像描述

just use:

pip3 install opencv-python

to install opencv to your python3 site-packages

https://pypi.org/project/opencv-python/

this will allow your python3 scripts to use the opencv pkg

if you don't want to use pip, seems there is more info here:

similar question

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM