简体   繁体   English

如何在 ubuntu 上的 python3.7 中安装 opencv?

[英]How can i install opencv in python3.7 on ubuntu?

I have a Nvidia Jetson tx2 with the orbitty shield on it.我有一个带有轨道防护罩的 Nvidia Jetson tx2。 I got it from a friend who worked on it last year.我从去年工作过的朋友那里得到的。 It came with ubuntu 16.04.它随 ubuntu 16.04 一起提供。 I updated everything on it and i installed the latest python3.7 and pip.我更新了它的所有内容,并安装了最新的 python3.7 和 pip。

I tried checking the version of opencv to see what i have but when i do import cv2 it gives me : Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'cv2'我尝试检查 opencv 的版本以查看我拥有的内容,但是当我导入 cv2 时,它给了我:回溯(最近一次调用最后一次):文件“”,第 1 行,在 ModuleNotFoundError 中:没有名为“cv2”的模块

Somehow besides python3.7 i have python2.7 and python3.5 installed.除了python3.7,我还安装了python2.7和python3.5。 If i try to import cv2 on python2.7 and 3.5 it works, but in 3.7 it doesn't.如果我尝试在 python2.7 和 3.5 上导入 cv2 它可以工作,但在 3.7 中却没有。

Can u tell me how can i install opencv in python3.7 and the latest version?你能告诉我如何在python3.7和最新版本中安装opencv吗?

Does python-3.7 -m pip install opencv-python work? python-3.7 -m pip install opencv-python工作吗? You may have to change the python-3.7 to whatever path/alias you use to open your own python 3.7.您可能需要将python-3.7更改为用于打开自己的 python 3.7 的任何路径/别名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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