Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
university:tools:m2k:libm2k:libm2k [28 Aug 2022 14:59] – Examples are not build by default. Add the flag to build them. Michele Zaffalonuniversity:tools:m2k:libm2k:libm2k [19 Sep 2022 13:22] (current) – updated some info on python bindings Alexandra Trifan
Line 42: Line 42:
 **libm2k for Windows ** **libm2k for Windows **
   * Download the **libm2k-Windows-setup.exe** and run through all the required steps.   * Download the **libm2k-Windows-setup.exe** and run through all the required steps.
-<note warning>Make sure you only select the libm2k Python bindings that correspond to your installed Python version.</note>+<note important>For libm2k versions starting with v0.6.0: The libm2k Windows installer does not include Python bindings. Check the Python bindings section for more details.</note> 
 +<note warning>For libm2k versions older than v0.6.0: Make sure you only select the libm2k Python bindings that correspond to your installed Python version.</note>
  
 **libm2k for Linux ** **libm2k for Linux **
   * Download the **libiio-ubuntu.deb** for your system (from the [[https://github.com/analogdevicesinc/libiio/blob/master/README.md| nightly builds]]) and install it by running **sudo apt install -f ./libiio-package.deb**.   * Download the **libiio-ubuntu.deb** for your system (from the [[https://github.com/analogdevicesinc/libiio/blob/master/README.md| nightly builds]]) and install it by running **sudo apt install -f ./libiio-package.deb**.
   * Download the **libm2k-ubuntu.deb** for your system and install it by running **sudo apt install -f ./libm2k-package.deb**.   * Download the **libm2k-ubuntu.deb** for your system and install it by running **sudo apt install -f ./libm2k-package.deb**.
-  * Download the Python bindings **python3-libm2k-ubuntu-amd64.deb** for Ubuntu 16.04 or 18.04 and install it by running **sudo apt-get install ./package.deb**. 
  
 **libm2k for OSX ** **libm2k for OSX **
Line 61: Line 61:
 ====== How to build it? ====== ====== How to build it? ======
  
-===== Building bindings =====+===== Building and installing bindings =====
  
 ==== Python bindings ==== ==== Python bindings ====
  
-The Python bindings are **enabled** by default if SWIG and a correct Python version are detected on your system. They can be specifically enabled or disabled by using the following:+  * **Option 1 - Download wheel packages**: The easiest way to use the libm2k Python bindings is to install them using **pip**. Starting with version v0.6.0, libm2k releases provide an archive containing **wheels** for Windows, Linux, MacOS corresponding to Python versions 3.7, 3.8, 3.9 and 3.10. 
 +<xterm>python3 -m pip install ./libm2k-0.6.0-cp310-cp310-win_amd64.whl</xterm> 
 + 
 +  * **Option 2 - Use test.pypi.org**: For every release starting with v0.6.0, all the Python wheels for libm2k will be uploaded to test.pypi.org. [[https://test.pypi.org/project/libm2k/#description|Check the files and install instructions here.]] 
 + 
 +  * **Option 3 - Conda packages**: If you are using Conda, libm2k packages are made available and updated at every major release. [[:university:tools:conda|Check out more details here.]] 
 + 
 +  * **Option 4 - Build the bindings**: The Python bindings are **enabled** by default if SWIG and a correct Python version are detected on your system. They can be specifically enabled or disabled by using the following:
 <xterm> <xterm>
 ~/libm2k/build$ **cmake -DENABLE_PYTHON=ON/OFF ..** ~/libm2k/build$ **cmake -DENABLE_PYTHON=ON/OFF ..**
Line 135: Line 142:
  
 If the Python bindings were enabled, they will be **automatically** installed in the site-packages folder specific for Python, once sudo make install is called. If the Python bindings were enabled, they will be **automatically** installed in the site-packages folder specific for Python, once sudo make install is called.
- 
-Python bindings can also be built and installed manually using: 
-<xterm> 
-~/libm2k$ **cd libm2k/build** 
-~/libm2k$ **python3 setup.py build** 
-~/libm2k$ **python3 setup.py install** 
-</xterm> 
  
 ===== Building on OSX ===== ===== Building on OSX =====
Line 219: Line 219:
   - Open a Command Prompt in the libiio folder and copy all the .dll files in ''C:\Windows\System32''.   - Open a Command Prompt in the libiio folder and copy all the .dll files in ''C:\Windows\System32''.
   - Open a Command Prompt in the build folder and copy libm2k.dll in ''C:\Windows\System32''.   - Open a Command Prompt in the build folder and copy libm2k.dll in ''C:\Windows\System32''.
-  - In the build folder run ''pip install wheel'' and ''python setup.py bdist_wheel'' in order to build and install the Python Bindings. 
  
 \\ \\
university/tools/m2k/libm2k/libm2k.txt · Last modified: 19 Sep 2022 13:22 by Alexandra Trifan