Win 10 环境 DepthAI 安装教程

Win 10 环境 DepthAI 安装教程

在Win 10上安装DepthAI【OpenCV OAK人工智能套件】

  1. 打开 docs.oakchina.cn 网站

  2. 转到 Python API 页面, 翻到 安装系统依赖 - Windows

  3. 安装 Chocolatey 软件包管理器(类似于 macOS 的 Homebrew)

    • 单击 开始按钮 ,找到 Windows PowerShell 右键单击 选择 以管理员身份运行

    • PowerShell 运行下方命令 ,安装 Chocolatey 软件包管理器

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    
  4. 安装 Python 和 PyCharm 等环境

    • 重新打开 PowerShell (管理员)

    • PowerShell 运行下方命令, 安装系统依赖

      choco install cmake git python pycharm-community -y
      

注:

​ 此步可能会产生网络错误等问题,可以重复运行多次(会消耗大量时间)

  1. 使用 pypi 镜像 (可选)

    • 重新打开 PowerShell (管理员)

    • PowerShell 运行下方命令, 配置镜像

       pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
      
  2. 使用 GitHub 镜像 (可选)

  3. 安装并测试 DepthAI (此时 DepthAI(OAK-D)应该连接在电脑上)

    • 单击 开始按钮 ,找到 JetBrains 文件夹,打开 PyCharm

    • 单机 New Project (新建项目),默认创建即可

    • 等待加载完成

    • 打开 右下角 Terminal

    • Terminal 运行下方命令,克隆 depthai 存储库

      git clone https://github.com/luxonis/depthai.git
      

      使用 GitHub 镜像 的可以执行

      fgit clone https://github.com/luxonis/depthai.git
      

      加速克隆存储库

    • 输入并运行 cd depthai 命令 ,将目录更改为该目录

    • Terminal 运行下方命令,安装依赖项(Win 10 使用 python 命令 ,Linux与MacOS 使用 python3)

      python install_requirements.py
      
    • 在 pycharm 左侧 project 工作区中打开 depthai 文件夹 找到 depthai_demo.py 文件并打开

    • 在代码区右键选择 Run(运行)运行代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

DMLong_x

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值