Closed tmorshed closed 2 years ago
The build fails because it's missing the GTK3 library, which is a build dependency. On Ubuntu this can be installed with sudo apt install libgtk-3-dev
. You might be missing other build dependencies too, at least one more is used in CI:
This prerequisite needs to be mentioned somewhere in the installation guide for Linux users, or tell them to use a wheel like the psychopy docs.
There's a comment about this in the requirements.txt:
So users on, say, Ubuntu 20.04 & Python 3.8, can use pip install -e . --find-links=https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/
when installing to ensure that pip won't try to build from source.
One potential issue is that the wxPython wheels are only available for a limited number of distributions and versions: (list of versions) Notably, it does not provide wheels for any of the Arch-based architecture Linux distributions (e.g. Manjaro, ArchLinux, Artix).
I've been using the Ubuntu-20.04 wheels for wxPython without issue on Arch, so I don't think this should be an issue in most cases. However, there are no wheels for Python 3.9+, I assume when Ubuntu 22.04 is released there will be a new build of wxPython for Python 3.9/3.10... but until then people might have to put up with the very long build time of wxPython for those Python versions (or just use 3.8).
- Include the text quoted above from the PsychoPy help page, for fetching and installing the wxPython wheel.
- Add a suggestion to the help pages for Linux users to use either of the distros above, or else they will not be able to use PsychoPy experiments.
So yes and yes :)
Also getting this problem now on linux, where I don't have sudo
access.
Solution I found =
conda install wxpython
pip install .
in eeg-notebooks folderAdded the conda part of that to the conda tab of the installation instructions
https://github.com/NeuroTechX/eeg-notebooks/commit/55a467f1384a1108231f9e045c6c5793745489ab
The extra wheels install line should be added to the venv
tab part of that box also.
ℹ Computer information
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
The installation process should fetch and install all required packages for eeg-notebooks, including
wxpython
which is a requirement for PsychoPy 4.❌ Actual result
The installation process installs all packages except for
wxpython
, producing the stderr & stdout:The error seems to be only limited to this exact package. All the other requirements have been installed successfully and can be imported and run as well. But
wxPython
is a requirement for PsychoPy and the user cannot run PsychoPy experiments without fixing this issue.📷 Screenshots
None
✍️ Additional Info:
This seems to be caused by interference between a default PyPI package called
wx
and the modern edition of the same package, calledwxPython
. It is used for making widgets on GTK.wxPython
is a requirement for PsychoPy and hence a requirement for eeg-notebooks. The PsychoPy help page outlines this as a way to fix the issue:One potential issue is that the wxPython wheels are only available for a limited number of distributions and versions:
Notably, it does not provide wheels for any of the Arch-based architecture Linux distributions (e.g. Manjaro, ArchLinux, Artix). It only supports the RedHat-based and Debian-based platforms. Even then, it has no support for Fedora > 31 (whereas the latest LTS version is 34). The Debian-based distros' wheels seem to be sufficient. The latest LTS versions are included.
🔧 Suggested fixes:
wxPython
wheel.