You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决Google Cloud Video Intelligence API开发中的No module named 'google'错误?

问题描述

已执行操作

  • 为使用Google Cloud Video Intelligence API,完成了官方教程的「开始之前」环节步骤
  • 完成Google Cloud SDK安装流程
  • 完成Python环境配置,以上步骤均无异常

工作目录详情

  • 专用目录路径:/Users/romanemeissonnier/Documents/video_intelligence_api
  • 目录根内容:
    .DS_Store
    env
    key_master_test.json
    google-cloud-sdk
    master_test_file.py
    test_video
    
  • env(Python虚拟环境)目录内容:
    bin
    include
    lib
    pyvenv.cfg
    quickstart.py
    
  • google-cloud-sdk目录内容:
    LICENSE             completion.zsh.inc  path.bash.inc
    README          data            path.fish.inc
    RELEASE_NOTES       deb         path.zsh.inc
    VERSION         install.bat     platform
    bin         install.sh      properties
    completion.bash.inc lib         rpm
    
  • test_video目录用于存放测试用.mp4视频文件

错误触发过程及报错信息

为验证Python虚拟环境能否访问google模块,在Visual Studio Code中编写代码:

from google.cloud import videointelligence

运行后抛出错误:

No module named 'google'
  File "/Users/romanemeissonnier/Documents/video_intelligence_api/env/master_test_file.py", line 2, in <module>
    from google.cloud import videointelligence
ModuleNotFoundError: No module named 'google'

内容的提问来源于stack exchange,提问作者rmeisso

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 12:30:25