[Bug|Zed] No module named ‘pyzed.sl‘

问题:
安装Zed-python-API的时候,直接用pip install pyzed 结果运行代码:import pyzed.sl as sl 的时候,跳错No module named 'pyzed.sl'

解决方法:
老老实实按照官网的步骤安装,

  1. 先检查一下ZED-SDK安装了没有,具体步骤见 Quick Start guide
  2. 然后按照官网指南 Install the ZED Python API 的要求运行代码安装,一定要注意是“运行代码”来安装,不是pip,也不是按照github issue里面什么复制sl.cp,都不是!

举例,在linux平台正确的做法是:

$ python -m pip install cython numpy opencv-python pyopengl
$ cd "/usr/local/zed/"  #这一步前提是你已经安装了zed
$ python3 get_python_api.py #运行官方的代码来安装API

然后它会吐结果,如果看到下面这种就大功告成


    # The script displays the detected platform versions
    Detected platform:
        ubuntu18
        Python 3.6
        CUDA 11.0
        ZED SDK 3.5

    # Downloads the corresponding whl package
    Checking if https://download.stereolabs.com/zedsdk/3.5/ubuntu18/cu110/py36 exists and is available
    Found ! Downloading python package into /usr/local/zed/pyzed-3.5-cp36-cp36m-linux_x86_64.whl

    # The script installs the Python API and gives instructions on how to do it manually if needed
    Processing ./pyzed-3.5-cp36-cp36m-linux_x86_64.whl
    Successfully installed pyzed-3.5
    To install it later or on a different environment run :
      python -m pip install --ignore-installed /usr/local/zed/pyzed-3.5-cp36-cp36m-linux_x86_64.whl

如果你想待会再安装,或者在另外的env安装,就按照最后一行的指示,运行:

python -m pip install --ignore-installed /usr/local/zed/pyzed-3.5-cp36-cp36m-linux_x86_64.whl
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值