如何在 python 虚拟环境中使用全局安装的 CV2(手动安装)包?

时间:2021-01-19 18:40:21

标签: python ubuntu cv2 python-venv

我已经在 Ubuntu 机器上手动安装了 CV2,当我导入 CV2 时它运行良好。
如果我创建虚拟环境 (python -m venv myvenv),则无法使用全局安装的 CV2。 请建议修复,将全局安装的包使用到 python 虚拟环境中。

Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2 as cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
>>> 

0 个答案:

没有答案
相关问题