usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Re: UHD Python API on windows

SR
Saurav Roy
Thu, Jul 28, 2022 1:24 PM

Dear sir/madam,
we are trying to install UHD and python API for B210 in windows 11. We are following binary installation for UHD. But after this, we do not know how to proceed to create the python API. On this page,  https://files.ettus.com/manual/page_python.html instructions are related to 'install the Python API when building UHD from source.' Could you please provide the Python API building steps for binary installation of UHD?  Thank you very much.

With regards
Saurav Roy

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

Dear sir/madam, we are trying to install UHD and python API for B210 in windows 11. We are following binary installation for UHD. But after this, we do not know how to proceed to create the python API. On this page, https://files.ettus.com/manual/page_python.html instructions are related to 'install the Python API when building UHD from source.' Could you please provide the Python API building steps for binary installation of UHD? Thank you very much. With regards Saurav Roy Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
WJ
White, Joshua J
Fri, Jul 29, 2022 1:43 PM

I just went through this myself, so I'll try to include my experience for
you.

First, make sure if you've already built and installed UHD, uninstall it and
run "make clean" in the build directory. If you've already built it but
haven't installed it, running "make clean" should be sufficient. Make sure
you have the 'master' branch of UHD checked out, and when you run cmake,
make sure you include the argument "-DENABLE_PYTHON_API=ON". You should get
an output from cmake that looks something like this:

-- ######################################################

-- # UHD enabled components

-- ######################################################

--  * LibUHD

--  * LibUHD - C API

--  * LibUHD - Python API

. other stuff .

The "Python API" line is the one you're looking for. Once that's done run
'make' and then 'sudo make install' and 'sudo ldconfig' as normal. Once it's
installed, test that it worked correctly by running 'python3' and typing
"import uhd". If you're not able to import the uhd module, make sure that
the uhd directory is located in the /usr/local/lib/python3/dist-packages/
directory. If not, try the installation process again.

I hope this helps.

Very respectfully,

Joshua White

Precision Timing Systems Engineer

Engineering & Support Solutions Directorate

www.riversideresearch.org http://www.riversideresearch.org/

T: 937.986.3153 | F: 937.431.3811

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain proprietary, confidential or
privileged information or otherwise be protected by law. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please notify the sender and destroy all copies and the
original message.

From: Saurav Roy via USRP-users usrp-users@lists.ettus.com
Sent: Thursday, July 28, 2022 9:25 AM
To: usrp-users@lists.ettus.com
Subject: [USRP-users] Re: UHD Python API on windows

CAUTION: This email is from outside of Riverside Research. Be careful when
clicking links or opening attachments unless you know the content is safe.

Dear sir/madam,

we are trying to install UHD and python API for B210 in windows 11. We are
following binary installation for UHD. But after this, we do not know how to
proceed to create the python API. On this page,
https://files.ettus.com/manual/page_python.html
https://files.ettus.com/manual/page_python.html instructions are related to
'install the Python API when building UHD from source.' Could you please
provide the Python API building steps for binary installation of UHD?  Thank
you very much.

With regards

Saurav Roy

Sent from  https://go.microsoft.com/fwlink/?LinkId=550986 Mail for Windows

I just went through this myself, so I'll try to include my experience for you. First, make sure if you've already built and installed UHD, uninstall it and run "make clean" in the build directory. If you've already built it but haven't installed it, running "make clean" should be sufficient. Make sure you have the 'master' branch of UHD checked out, and when you run cmake, make sure you include the argument "-DENABLE_PYTHON_API=ON". You should get an output from cmake that looks something like this: -- ###################################################### -- # UHD enabled components -- ###################################################### -- * LibUHD -- * LibUHD - C API -- * LibUHD - Python API . other stuff . The "Python API" line is the one you're looking for. Once that's done run 'make' and then 'sudo make install' and 'sudo ldconfig' as normal. Once it's installed, test that it worked correctly by running 'python3' and typing "import uhd". If you're not able to import the uhd module, make sure that the uhd directory is located in the /usr/local/lib/python3/dist-packages/ directory. If not, try the installation process again. I hope this helps. Very respectfully, Joshua White Precision Timing Systems Engineer Engineering & Support Solutions Directorate www.riversideresearch.org <http://www.riversideresearch.org/> T: 937.986.3153 | F: 937.431.3811 This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain proprietary, confidential or privileged information or otherwise be protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender and destroy all copies and the original message. From: Saurav Roy via USRP-users <usrp-users@lists.ettus.com> Sent: Thursday, July 28, 2022 9:25 AM To: usrp-users@lists.ettus.com Subject: [USRP-users] Re: UHD Python API on windows CAUTION: This email is from outside of Riverside Research. Be careful when clicking links or opening attachments unless you know the content is safe. Dear sir/madam, we are trying to install UHD and python API for B210 in windows 11. We are following binary installation for UHD. But after this, we do not know how to proceed to create the python API. On this page, <https://files.ettus.com/manual/page_python.html> https://files.ettus.com/manual/page_python.html instructions are related to 'install the Python API when building UHD from source.' Could you please provide the Python API building steps for binary installation of UHD? Thank you very much. With regards Saurav Roy Sent from <https://go.microsoft.com/fwlink/?LinkId=550986> Mail for Windows
SR
Saurav Roy
Fri, Jul 29, 2022 2:26 PM

Dear sir,
thank you for replying. But I think you are talking about UHD installation from source in LINUX. However, I am stuck at binary installation in Windows. Following this page https://files.ettus.com/manual/page_install.html , when we run the pre-built UHD  installer it gets installed easily, but from there we don't know how to get the python API. There is no option for “-DENABLE_PYTHON_API=ON” here for the binary installation of UHD. Could you please help us here? Thank you.

With regards
Saurav Roy


From: White, Joshua J jjwhite@RiversideResearch.org
Sent: Friday, July 29, 2022 7:13 PM
To: Saurav Roy sauravroy@iisc.ac.in; usrp-users@lists.ettus.com usrp-users@lists.ettus.com
Subject: RE: [USRP-users] Re: UHD Python API on windows

External Email

Dear sir, thank you for replying. But I think you are talking about UHD installation from source in LINUX. However, I am stuck at binary installation in Windows. Following this page https://files.ettus.com/manual/page_install.html , when we run the pre-built UHD installer it gets installed easily, but from there we don't know how to get the python API. There is no option for “-DENABLE_PYTHON_API=ON” here for the binary installation of UHD. Could you please help us here? Thank you. With regards Saurav Roy ________________________________ From: White, Joshua J <jjwhite@RiversideResearch.org> Sent: Friday, July 29, 2022 7:13 PM To: Saurav Roy <sauravroy@iisc.ac.in>; usrp-users@lists.ettus.com <usrp-users@lists.ettus.com> Subject: RE: [USRP-users] Re: UHD Python API on windows External Email
NB
Nikos Balkanas
Fri, Jul 29, 2022 3:08 PM

Since build is a user directory, I just save my Cmake configuration
elsewhere and rm-rf * in build...
Clean leave lots of stuff behind:(

HTH
Nikos

On Fri, Jul 29, 2022 at 4:48 PM White, Joshua J
jjwhite@riversideresearch.org wrote:

I just went through this myself, so I’ll try to include my experience for you.

First, make sure if you’ve already built and installed UHD, uninstall it and run “make clean” in the build directory. If you’ve already built it but haven’t installed it, running “make clean” should be sufficient. Make sure you have the ‘master’ branch of UHD checked out, and when you run cmake, make sure you include the argument “-DENABLE_PYTHON_API=ON”. You should get an output from cmake that looks something like this:

-- ######################################################

-- # UHD enabled components

-- ######################################################

--  * LibUHD

--  * LibUHD - C API

--  * LibUHD - Python API

… other stuff …

The “Python API” line is the one you’re looking for. Once that’s done run ‘make’ and then ‘sudo make install’ and ‘sudo ldconfig’ as normal. Once it’s installed, test that it worked correctly by running ‘python3’ and typing “import uhd”. If you’re not able to import the uhd module, make sure that the uhd directory is located in the /usr/local/lib/python3/dist-packages/ directory. If not, try the installation process again.

I hope this helps.

Very respectfully,

Joshua White

Precision Timing Systems Engineer

Engineering & Support Solutions Directorate

www.riversideresearch.org

T: 937.986.3153 | F: 937.431.3811

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain proprietary, confidential or privileged information or otherwise be protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender and destroy all copies and the original message.

From: Saurav Roy via USRP-users usrp-users@lists.ettus.com
Sent: Thursday, July 28, 2022 9:25 AM
To: usrp-users@lists.ettus.com
Subject: [USRP-users] Re: UHD Python API on windows

CAUTION: This email is from outside of Riverside Research. Be careful when clicking links or opening attachments unless you know the content is safe.

Dear sir/madam,

we are trying to install UHD and python API for B210 in windows 11. We are following binary installation for UHD. But after this, we do not know how to proceed to create the python API. On this page,  https://files.ettus.com/manual/page_python.html instructions are related to 'install the Python API when building UHD from source.' Could you please provide the Python API building steps for binary installation of UHD?  Thank you very much.

With regards

Saurav Roy

Sent from Mail for Windows


USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com

Since build is a user directory, I just save my Cmake configuration elsewhere and rm-rf * in build... Clean leave lots of stuff behind:( HTH Nikos On Fri, Jul 29, 2022 at 4:48 PM White, Joshua J <jjwhite@riversideresearch.org> wrote: > > I just went through this myself, so I’ll try to include my experience for you. > > > > First, make sure if you’ve already built and installed UHD, uninstall it and run “make clean” in the build directory. If you’ve already built it but haven’t installed it, running “make clean” should be sufficient. Make sure you have the ‘master’ branch of UHD checked out, and when you run cmake, make sure you include the argument “-DENABLE_PYTHON_API=ON”. You should get an output from cmake that looks something like this: > > > > -- ###################################################### > > -- # UHD enabled components > > -- ###################################################### > > -- * LibUHD > > -- * LibUHD - C API > > -- * LibUHD - Python API > > … other stuff … > > > > The “Python API” line is the one you’re looking for. Once that’s done run ‘make’ and then ‘sudo make install’ and ‘sudo ldconfig’ as normal. Once it’s installed, test that it worked correctly by running ‘python3’ and typing “import uhd”. If you’re not able to import the uhd module, make sure that the uhd directory is located in the /usr/local/lib/python3/dist-packages/ directory. If not, try the installation process again. > > > > I hope this helps. > > > > Very respectfully, > > > > Joshua White > > Precision Timing Systems Engineer > > Engineering & Support Solutions Directorate > > www.riversideresearch.org > > T: 937.986.3153 | F: 937.431.3811 > > > > This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain proprietary, confidential or privileged information or otherwise be protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender and destroy all copies and the original message. > > > > From: Saurav Roy via USRP-users <usrp-users@lists.ettus.com> > Sent: Thursday, July 28, 2022 9:25 AM > To: usrp-users@lists.ettus.com > Subject: [USRP-users] Re: UHD Python API on windows > > > > CAUTION: This email is from outside of Riverside Research. Be careful when clicking links or opening attachments unless you know the content is safe. > > > > Dear sir/madam, > > we are trying to install UHD and python API for B210 in windows 11. We are following binary installation for UHD. But after this, we do not know how to proceed to create the python API. On this page, https://files.ettus.com/manual/page_python.html instructions are related to 'install the Python API when building UHD from source.' Could you please provide the Python API building steps for binary installation of UHD? Thank you very much. > > > With regards > > Saurav Roy > > > > Sent from Mail for Windows > > > > _______________________________________________ > USRP-users mailing list -- usrp-users@lists.ettus.com > To unsubscribe send an email to usrp-users-leave@lists.ettus.com
CH
Cédric Hannotier
Fri, Jul 29, 2022 3:50 PM

Dear Saurav Roy,

On 2022-07-29 14:26 +0000, Saurav Roy via USRP-users wrote:

However, I am stuck at binary installation in Windows.

The binary executable does not seem to provide the Python API.
I think you will have to compile the UHD library
with the python binding enabled on Windows yourself.

Regards

Cédric Hannotier

Dear Saurav Roy, On 2022-07-29 14:26 +0000, Saurav Roy via USRP-users wrote: > However, I am stuck at binary installation in Windows. The binary executable does not seem to provide the Python API. I think you will have to compile the UHD library with the python binding enabled on Windows yourself. Regards -- Cédric Hannotier
RV
Ryan Volz
Fri, Jul 29, 2022 6:34 PM

Hi,

Since you're looking for a Windows binary distribution of UHD that
includes the Python bindings, you might find radioconda useful:

https://github.com/ryanvolz/radioconda

Alternatively, you can install the UHD conda package from an existing
conda installation (e.g. Mambaforge):

conda install -c conda-forge uhd

Cheers,
Ryan

On 7/29/22 10:26 AM, Saurav Roy via USRP-users wrote:

Dear sir,
thank you for replying. But I think you are talking about UHD
installation from source in LINUX. However, I am stuck at binary
installation in Windows. Following this page
https://files.ettus.com/manual/page_install.html
https://files.ettus.com/manual/page_install.html , when we run the
pre-built UHD  installer it gets installed easily, but from there we
don't know how to get the python API. There is no option for
“-DENABLE_PYTHON_API=ON” here for the binary installation of UHD. Could
you please help us here? Thank you.

With regards
Saurav Roy


From: White, Joshua J jjwhite@RiversideResearch.org
Sent: Friday, July 29, 2022 7:13 PM
To: Saurav Roy sauravroy@iisc.ac.in; usrp-users@lists.ettus.com
usrp-users@lists.ettus.com
Subject: RE: [USRP-users] Re: UHD Python API on windows
External Email


USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com

Hi, Since you're looking for a Windows binary distribution of UHD that includes the Python bindings, you might find radioconda useful: https://github.com/ryanvolz/radioconda Alternatively, you can install the UHD conda package from an existing conda installation (e.g. Mambaforge): conda install -c conda-forge uhd Cheers, Ryan On 7/29/22 10:26 AM, Saurav Roy via USRP-users wrote: > Dear sir, > thank you for replying. But I think you are talking about UHD > installation from source in LINUX. However, I am stuck at binary > installation in Windows. Following this page > https://files.ettus.com/manual/page_install.html > <https://files.ettus.com/manual/page_install.html> , when we run the > pre-built UHD  installer it gets installed easily, but from there we > don't know how to get the python API. There is no option for > “-DENABLE_PYTHON_API=ON” here for the binary installation of UHD. Could > you please help us here? Thank you. > > With regards > Saurav Roy > > ------------------------------------------------------------------------ > *From:* White, Joshua J <jjwhite@RiversideResearch.org> > *Sent:* Friday, July 29, 2022 7:13 PM > *To:* Saurav Roy <sauravroy@iisc.ac.in>; usrp-users@lists.ettus.com > <usrp-users@lists.ettus.com> > *Subject:* RE: [USRP-users] Re: UHD Python API on windows > External Email > > > _______________________________________________ > USRP-users mailing list -- usrp-users@lists.ettus.com > To unsubscribe send an email to usrp-users-leave@lists.ettus.com