This shows you the differences between two versions of the page.
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 Zaffalon | university: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> | + | <note important> |
+ | <note warning>For libm2k versions older than v0.6.0: | ||
**libm2k for Linux ** | **libm2k for Linux ** | ||
* Download the **libiio-ubuntu.deb** for your system (from the [[https:// | * Download the **libiio-ubuntu.deb** for your system (from the [[https:// | ||
* Download the **libm2k-ubuntu.deb** for your system and install it by running **sudo apt install -f ./ | * Download the **libm2k-ubuntu.deb** for your system and install it by running **sudo apt install -f ./ | ||
- | * 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 ./ | ||
**libm2k for OSX ** | **libm2k for OSX ** | ||
Line 61: | Line 61: | ||
====== How to build it? ====== | ====== How to build it? ====== | ||
- | ===== Building bindings ===== | + | ===== Building |
==== 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. |
+ | < | ||
+ | |||
+ | * **Option 2 - Use test.pypi.org**: | ||
+ | |||
+ | * **Option 3 - Conda packages**: If you are using Conda, libm2k packages are made available and updated at every major release. [[: | ||
+ | |||
+ | * **Option 4 - Build the bindings**: | ||
< | < | ||
~/ | ~/ | ||
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: | ||
- | < | ||
- | ~/libm2k$ **cd libm2k/ | ||
- | ~/libm2k$ **python3 setup.py build** | ||
- | ~/libm2k$ **python3 setup.py install** | ||
- | </ | ||
===== 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 '' | - Open a Command Prompt in the libiio folder and copy all the .dll files in '' | ||
- Open a Command Prompt in the build folder and copy libm2k.dll in '' | - Open a Command Prompt in the build folder and copy libm2k.dll in '' | ||
- | - In the build folder run '' | ||
\\ | \\ |