Package: pylsl-coral
pylsl for Google CoralThis project is a clone ofpylslwith an addedliblsl.socompiled on the Google Coral.This is the Python interface to theLab Streaming Layer (LSL).
LSL is an overlay network for real-time exchange of time series between applications,
most often used in research environments. LSL has clients for many other languages
and platforms that are compatible with each other.Let us know if you encounter any bugs (ideally using the issue tracker on
the GitHub project).InstallationPrerequisitesOn all non-Windows platforms and for some Windows-Python combinations, you must first obtain a liblsl shared library:On many platforms it can be installed withconda install -c conda-forge liblslAdditionally, on Mac it can be installed withbrew install labstreaminglayer/tap/lslYou might be able to find the appropriate liblsl shared object (*.so on Linux, *.dylib on MacOS, or *.dll on Windows) from theliblsl release page.Otherwise you might try to clone liblsl and use itsstandalone_compilation_linux.shscript (works on raspberry pi).Prepared distributionsInstall frompypiusingpip:pip install pylslFor several distributions, the pip distribution ships with lsl.dll. For every other case, liblsl must be installed somewhere on the PATH (see Prerequisites above) or downloaded and copied somewhere on the search path. We recommend you copy it to the pylsl installed module path'slibsubfolder. i.e.{path/to/env/}site-packages/pylsl/lib. Usepython -m siteto find the "site-packages" path.
(usecp -Lon platforms that use symlinks)Self-builtDownload the pylsl source:git clone https://github.com/labstreaminglayer/liblsl-Python.git && cd liblsl-PythonCopy the shared object (see Prerequisites above) intoliblsl-Python/pylsl/lib.From theliblsl-Pythonworking directory, runpip install ..Note: You can usepip install -e .to install while keeping the files in-place. This is convenient for developing pylsl.UsageSee the examples in pylsl/examples. Note that these can be run directly from the commandline with (e.g.)python -m pylsl.examples.{name-of-example}.You can get a list of the examples withpython -c "import pylsl.examples; help(pylsl.examples)"For maintainersContinuous Integrationpylsl uses continuous integration and distribution.Whenever a new commit is pushed, AppVeyor prepares several files. First it prepares the source wheels -- this is useful on any platform & Python version that does not have a specific binary distribution. Then it prepares the binary wheels; it downloads liblsl from its releases page, copies it to the package, then builds wheels for distribution. This process is repeated for several variants of Windows and Mac.In addition, whenever a newgit tagis used on a commit that is pushed to the master branch, the CI systems will deploy the wheels to pypi.Linux Binaries DeprecatedWe recently stopped building binary wheels for Linux. In practice, themanylinuxdependencies were often incompatible with real systems.When we did make manylinux distributions, these relied on special liblsl builds that are not automatically pushed to the liblsl releases page. Special pipelines needed to be run manually onAzure, then the artifacts uploaded to the release page. The Azure pipelines config remains in the liblsl repo in case it is needed again (unlikely).Manual DistributionManual way:rm -Rf build dist *.egg-infopython setup.py sdist bdist_wheelAdditional steps on Linux:auditwheel repair dist/*.whl -w distrm dist/*-linux_x86_64.whltwine upload dist/*For condabuild liblsl:conda build ../liblsl/conda build .Known Issues with Multithreading on LinuxAt least for some versions of pylsl , is has been reported that running on Linux one cannot callpylslfunctions from a thread that is not the main thread. This has been reported to cause access violations, and can occur during pulling from an inlet, and also from accessing an inlets info structure in a thread.Recent tests with mulithreading (especially when safeguarding library calls with locks) using Python 3.7.6. with pylsl 1.14 on Linux Mint 20 suggest that this issue is solved, or at least depends on your machine. Seehttps://github.com/labstreaminglayer/liblsl-Python/issues/29AcknowledgmentsPylsl was primarily written by Christian Kothe while at Swartz Center for Computational Neuroscience, UCSD. The LSL project was funded by the Army Research Laboratory under Cooperative Agreement Number W911NF-10-2-0022 as well as through NINDS grant 3R01NS047293-06S1. pylsl is maintained primarily by Chadwick Boulay. Thanks for contributions, bug reports, and suggestions go to Bastian Venthur, David Medine, Clemens Brunner, and Matthew Grivich.