简体   繁体   English

opencv 并在 Windows 上导入 cv2

[英]opencv and importing cv2 on Windows

I would love to get your advices: I just finished install open cv using "pip install opencv-python" on both computer terminal and on vscode.我很想得到您的建议:我刚刚在计算机终端和 vscode 上使用“pip install opencv-python”完成了 open cv 的安装。 But still it doesn't appear cv2 for importing on my vscode editor here.但是它仍然没有出现 cv2 用于在我的 vscode 编辑器上导入。

I don't have enough points.我积分不够this is the image that include my dir to the opencv:这是包含我的目录到 opencv 的图像:

在此处输入图片说明

Are you using the base environment of the anaconda?你用的是anaconda的基础环境吗? You can get which python interpreter you are using on the status bar at the bottom-left in the VSCode.您可以在 VSCode 左下角的状态栏上获取您正在使用的 Python 解释器。

在此处输入图片说明

If you don't want to switch to this anaconda environemnt, you need to recreate a terminal with the shortcut Ctrl+Shift+` , and then install the opencv-python again.如果不想切换到这个anaconda环境,需要用快捷键Ctrl+Shift+`重新创建一个终端,然后重新安装opencv-python

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

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