您好,欢迎来到图艺博知识网。
搜索
您的当前位置:首页matlab找不到RTL设备,在mac环境中使用rtlsdr遭遇的AttributeError: dlsym(RTLD_DEFAULT, rtlsdr_get_device_count): symbo...

matlab找不到RTL设备,在mac环境中使用rtlsdr遭遇的AttributeError: dlsym(RTLD_DEFAULT, rtlsdr_get_device_count): symbo...

来源:图艺博知识网

最近在Mac上研究rtlsdr。本来期望使用高大上的Matlab来学习的。可是Matlab上的素材实在太偏学术,羞涩难懂,不得已转到Python上学习。

在电脑上部署了conda+pycharm环境后。运行python的示例程序,结果报了一堆错误。将代码缩减到仅仅只是import rtlsdr,还是报错

>>> import rtlsdr

Traceback (most recent call last):

File "", line 1, in

File "/Users/weidong/opt/anaconda3/lib/python3.7/site-packages/rtlsdr/__init__.py", line 56, in

from .librtlsdr import librtlsdr

File "/Users/weidong/opt/anaconda3/lib/python3.7/site-packages/rtlsdr/librtlsdr.py", line 61, in

f = librtlsdr.rtlsdr_get_device_count

File "/Users/weidong/opt/anaconda3/lib/python3.7/ctypes/__init__.py", line 377, in __getattr__

func = self.__getitem__(name)

File "/Users/weidong/opt/anaconda3/lib/python3.7/ctypes/__init__.py", line 382, in __getitem__

func = self._FuncPtr((name_or_ordinal, self))

AttributeError: dlsym(RTLD_DEFAULT, rtlsdr_get_device_count): symbol not found

查了各种资料,发现可能跟Mac环境有关,缺个库librtlsdr。而这个库在pip的时候不会自动导入。需要brew一下。于是运行

brew install librtlsdr

搞定!

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuoyibo.net 版权所有 湘ICP备2023021910号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务