UHD驱动程序安装失败

发布于 2025-02-10 22:38:24 字数 1622 浏览 1 评论 0原文

我有点新的发布,所以请原谅并纠正我在这篇文章中犯的任何错误(如果我缺乏任何必要的信息,请告诉我)

我在此指南的第6章

sudo apt-get install git cmake libboost-all-dev libusb-1.0-0-dev python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools build-essential
cd ~
git clone https://github.com/EttusResearch/uhd.git
cd uhd/host
mkdir build
cd build
cmake -DENABLE_TESTS=OFF -DENABLE_C_API=OFF -DENABLE_MANUAL=OFF ..
make -j8
sudo make install
sudo ldconfig

​运行测试代码以确保我正确安装它,

python3
import uhd
usrp = uhd.usrp.MultiUSRP()
samples = usrp.recv_num_samps(10000, 100e6, 1e6, [0], 50)
print(samples[0:10])

我将获得以下输出。

>> Traceback (most recent call last):
>>   File <stdin>, line 1, in <module>
>> AttributeError: module 'uhd' has no attribute usrp`

我不确定为什么要获得此输出。我已经查找了这个错误,发现此

我正在使用Ubuntu 22.04 LTS 5GB RAM和3个专用CPU运行虚拟机。

     >> -- # UHD enabled components
>> -- ######################################################
>> --   * LibUHD
>> --   * LibUHD - C API
>> --   * LibUHD - Python API
>> --   * Examples
>> --   * Utils
>> --   * Tests
>> --   * USB
>> --   * B100
>> --   * B200
>> --   * USRP1
>> --   * USRP2
>> --   * X300
>> --   * MPMD
>> --   * N300
>> --   * N320
>> --   * E320
>> --   * E300
>> --   * OctoClock
>> --   * DPDK
>> --   * SIM

我还尝试了PYBOMBS安装“ Pybombs安装UHD”,但仍获得相同的错误输出。

如果有人知道问题/解决方案,请告诉我!

谢谢!

I am somewhat new to posting so please forgive and correct any mistakes I make in this post (and if I lack any necessary information please tell me)

I am following Ch.6 of this guide here https://pysdr.org/content/usrp.html, and am attempting to install the UHD drivers with these following steps

sudo apt-get install git cmake libboost-all-dev libusb-1.0-0-dev python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools build-essential
cd ~
git clone https://github.com/EttusResearch/uhd.git
cd uhd/host
mkdir build
cd build
cmake -DENABLE_TESTS=OFF -DENABLE_C_API=OFF -DENABLE_MANUAL=OFF ..
make -j8
sudo make install
sudo ldconfig

However, when I run the test code to ensure that I installed it correctly,

python3
import uhd
usrp = uhd.usrp.MultiUSRP()
samples = usrp.recv_num_samps(10000, 100e6, 1e6, [0], 50)
print(samples[0:10])

I get the following output.

>> Traceback (most recent call last):
>>   File <stdin>, line 1, in <module>
>> AttributeError: module 'uhd' has no attribute usrp`

I am unsure as to why I get this output. I had looked up this error and found this https://www.mail-archive.com/[email protected]/msg11331.html where the person had the exact same error, and the recommendation was to alter the PYTHONPATH variable, but was unsure how to do so.

I'm running a virtual machine with Ubuntu 22.04 LTS 5GB of Ram and 3 dedicated CPUs.

     >> -- # UHD enabled components
>> -- ######################################################
>> --   * LibUHD
>> --   * LibUHD - C API
>> --   * LibUHD - Python API
>> --   * Examples
>> --   * Utils
>> --   * Tests
>> --   * USB
>> --   * B100
>> --   * B200
>> --   * USRP1
>> --   * USRP2
>> --   * X300
>> --   * MPMD
>> --   * N300
>> --   * N320
>> --   * E320
>> --   * E300
>> --   * OctoClock
>> --   * DPDK
>> --   * SIM

I also attempted pybombs installation "pybombs install uhd" and still got the same error output.

If anybody knows the issue/a solution please tell me!

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妥活 2025-02-17 22:38:24

我已经通过关注。安装时,我没有遇到任何错误,但是在测试时,我遇到了同样的错误:

追溯(最近的最新电话):

file&lt; stdin&gt;,第1行,in&lt; module&gt;

attributeError:模块'uhd'没有属性usrp

解决方案:我仅通过导出python3路径

导出pythonpath =“/usr/usr/usr/local/lib/python3.6/python3.6/site-ackages /“

I have installed the UHD driver by following https://pysdr.org/content/usrp.html. While installing, I did not get any error, but while testing, I was getting the same error:

Traceback (most recent call last):

File <stdin>, line 1, in <module>

AttributeError: module 'uhd' has no attribute usrp

Solution: I resolved the error just by exporting the python3 path

export PYTHONPATH="/usr/local/lib/python3.6/site-packages/"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文