Changes to Linux dependencies

I am in the process of packaging 1.84.01 for Arch Linux. I found some differences between the packages I needed to install to pass the unit tests and those listed at: http://www.psychopy.org/installation.html#dependencies

It appears that the configobj and requests packages are now required. I am using pyglet 1.2.4 (docs say not 1.2), wxpython 3.0.2 (docs say use 2.8 and not 2.9), and PILLOW instead of PIL. On Linux the “old” avbin is version 7 and not 5. I am using 64 bit python, but the docs say 32-bit only. Are there still know version incompatibilities for any of these?

The moviepy python package also seems useful and is not listed anywhere. The changelog for 1.84.0 suggests that PyQT is preferred over wx. Are there other preferred package options that are not listed?

:slight_smile:

Yes, all the above. Sorry, I haven’t updated the docs.

Explanations:

  • configobj used to be included inside psychopy (because it was a single python file) but now it isn’t so it needs to be installed
  • I think PsychoPy is now fully compatible with all versions of pyglet, wx and PILLOW, so install whatever you like there (there have been some slight issues with wx3.0.2 on mac but I think those are bugs in wx not in the psychopy code, and they might well be mac-specific
  • psychopy is also completely compatible with pyqt5 and pyqt4 and I personally prefer the resulting dialog boxes to the wx dialogs (and they don’t have that old problem that selection items fail to work after importing pyglet) so I’ve made QT the default dialogs engine but psychopy will silently drop back to wx as well as choosing whatever QT version has been installed
  • moviepy (which will install imageio) is easiest to support in terms of video rendering, but opencv combined with vlc should be OK too. avbin is dead to me.
  • for sounds I’ve added support for pysoundcard / pysoundfile which are new python wrappers for portaudio and libsndfile that I hope will replace pyo eventually. So those are optional extras but I need to test their performance before making a recommendation.

In order for me to start the PsychoPy app on Arch Linux, I need configobject, wxpython, requests, pandas, scipy, and either PIL or PILLOW. On Arch, and probably most systems, numpy gets pulled in by pandas and scipy.

In order for the benchmark routine to run, I also needed pyglet, matplotlib, and psutil. I tried installing pygame instead of pyglet, along with setting the window type preference to pygame, but pyglet still seems to be required. This is surprising to me, but may be both intentional and necessary.

To pass the unit tests (excluding the ioHub tests and those that require sound), I needed to add opengl, lxml, openpyxl. To pass the ioHub tests, I needed xlib, yaml, msgpack, and gevent. To pass the sound tests I need either moviepy and either pyo or pygame. Presumably pysoundcard/pysoundfile also work, but they are not packaged for Arch (yet). I have not tried to get it to work with opencv and vlc instead of moviepy.

At some point I thought pytables was needed. I am not sure, but I am guessing this is because pandas is a requirement now. It doesn’t look like I need avbin7 anymore :slight_smile:.

On Arch, matplotlib pulls in pyqt5 even though it is only an optional dependency. This means I cannot easily confirm if the fall back to wx works or if pyqt is actually required.

Maybe something like this for the dependencies text


If you want to install each library individually rather than use the simpler distributions of packages above then you can download the following. Make sure you get the correct version for your OS and your version of Python. easy_install will work for many of these, but some require compiling from source.


Maybe add pyqt to the suggested packages. That said, the suggested packages look out of date also (e.g., psignifit is essentially a dead project).

OK, I’ve done some work on the docs installation and updated the dependencies a great deal:

http://www.psychopy.org/installation.html#dependencies

The interesting thing is that nearly everything now can be installed using pip so doing a manual install of dependencies on any system is much easier than before. As a result, rather than merely listing them, I’ve provided the pip install functions, including one long variant that includes pretty much everything as a single install line:

pip install numpy scipy matplotlib pandas pyopengl pyglet pillow moviepy lxml openpyxl configobj pyyaml gevent greenlet msgpack-python psutil tables requests[security] pyosf cffi pysoundcard pysoundfile seaborn psychopy_ext bidi psychopy
pip install pyserial pyparallel egi iolabs  # hardware
pip install pytest coverage sphinx  # dev 
pip install pypiwin32  # win only
pip install pyobjc  # mac only

I’ve also:

  • removed most of the demands on which version of the packages are used (nearly all those comments were out of date and we handle most current versions of all the packages)
  • removed mention of psignifit

As to your queries:

  • pyglet is indeed a strict dependency, whereas pygame is deprecated and untested. It was too painful trying to allow either option and have them work equivalently
  • tables is indeed a suggestion but I think the only place it’s used is for output of hdf5 data from iohub
  • pandas has become a strict requirement for saving csv data files (but I don’t think tables is a strict requirement for pandas)
1 Like

Sorry to bring this back from the dead. The docs now mention pyosf, which I think is located at https://github.com/psychopy/pyosf, and psychopy_ext, which I cannot find.

I am going to try and package pyosf. Any hints, tricks, issues or dependencies? Is it really needed or optional?

What about psychopy_ext?

psyosf provides the option to host projects on open science framework from the “projects” menu in PsychoPy app. It can be installed with pip. Yes, that’s the link to it on github and it includes a requirements.txt. Then again, the only thing pyosf requires is requests which psychopy already required.

psychopy_ext is not a strict requirement but can be used to generate psychopy experiments in code faster:
https://github.com/qbilius/psychopy_ext for code
http://psychopy-ext.klab.lt/ for docs

In 1.85.3 there are two more (genuine) dependencies, both to allow a smoother transition to Python3 in the PsychoPy 1.86 release (with dual support for Py3 and Py2.7). Not sure when that will be released - I want to do more Python3 tests first. It adds these:

  • the future package provides some compatibility functions
  • the json_tricks package allows us to save monitor files in JSON format so that Python3 will be able to read them (we obviously need to do this in advance of the switch)

Going forward, how about simply using pip for packaging? Right now, using the PsychoPy repository and simply installing python and doing
pip install .
gets a pretty complete installation. The only thing that might need custom building is wxPython and pyo. The nice thing is that this means you and Yaroslav don’t have to keep updating installers on all different linux flavours; I just need to update the one pip setup.py script

Jon

pip works for some people, but others like to let the package manager do all the work :slight_smile: Packaging isn’t too bad, as long as you don’t change the dependencies without updating the documentation.

Haha, fair enough. I will try to keep them more up to date. :wink: