You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Unable to run "sdl-config"" during Linux installation (e.g. Ubuntu 20.04+) #178
We should see if we can easily switch to Pygame 2. I intended to make that switch only as part of the next major version (i.e. 1.0), but we might want to release a 0.11.0 that supports it already sooner.
My current workaround, for Ubuntu 20.04 LTS (using setup.py install from source, rather than pip install)
Expyriment seems to be working fine with pygame2.0.3, but I have not checked extensively to be able to confirm that it does not break anoything.
Pygame2 relies on sdl2, where everything under the hood is using opengl. Maybe the pyopengl code in expyriment would no longer be necessary to achieve the same performance (?)
It might be possible. I have not looked at Pygame/SDL 2 yet. We mainly need OpenGL for blocking on the vertical retrace. If this is now possible in Pygame 2 natively, then indeed we might be able to drop OpenGL.
I manage to install expyriment on Linux by running `python setup.py
install` from the current source code, because `requirements.txt` has
'pygame>=2.0.0.dev6'.
On the other hand `pip install expyriment` requires pygame<2, which can be
problematic if you already have pygame 2 installed. (in the past, I used to
create an environment just for expyriment, with pygame 1.9.6)
I have not yet encountered bugs with expyriment/pygame2 under Linux (which
does not mean that there are none...; I seem to remember that under macosx
some of students encountered a weird behavior at some point).
For information:
I have just installed Ubuntu 20.04 in wsl2 under windows11. I then
installed python3-pygame python3-opengl with apt.
The pygame version installed in this way is version 1.9.6 (if I had run pip
install pygame, I would have gotten pygame 2).
Finally `pip install expyriment` works like a charm and the graphics and
sound tests are ok.
So we cannot say that "expyriment is broken under linux". If one has pygame
1.9.6, then it is ok.
I will check with the upcoming ubuntu 22.04.
--
Christophe Pallier (http://www.pallier.org)
INSERM Cognitive Neuroimaging Lab (http://www.unicog.org)
On Sun, Mar 27, 2022 at 10:44 AM Christophe Pallier ***@***.***>
wrote:
I manage to install expyriment on Linux by running `python setup.py
install` from the current source code, because `requirements.txt` has
'pygame>=2.0.0.dev6'.
On the other hand `pip install expyriment` requires pygame<2, which can be
problematic if you already have pygame 2 installed. (in the past, I used to
create an environment just for expyriment, with pygame 1.9.6)
I have not yet encountered bugs with expyriment/pygame2 under Linux (which
does not mean that there are none...; I seem to remember that under macosx
some of students encountered a weird behavior at some point).
--
Christophe Pallier (http://www.pallier.org)
INSERM Cognitive Neuroimaging Lab (http://www.unicog.org)
On Fri, Mar 25, 2022 at 1:59 PM Oliver Lindemann ***@***.***>
wrote:
> @fladd <https://github.com/fladd> Have you had a look into it already?
> Would be great, if Exypriment is running again on Linux out of the box.
>
> —
> Reply to this email directly, view it on GitHub
> <#178 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AALVWMQO6VZ5N6WAVZZVUJLVBW2CFANCNFSM5EG2A3QA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
Yes, you are right we cannot say "expyriment is broken under Linux", just the pip installation is broken. It's just difficult to work with virtual environments, if you have to install pygame via apt. The upcoming version 0.11 should however solve all this issues.
To be more precise, it seems to me that under Ubuntu, the issue occurs if
one installs pygame with "pip install pygame" (which installs pygame2).
Then one has the wrong libraries for SDL,... and dependency hell occurs ...
Yet if one installs pygame with "apt install python3-pygame", 1.9.6 is
installed with all the correct dependencies and "pip expyriment" works like
a charm.
(I have just installed it without problem on a pristine Ubuntu 20.04
distrib, following my own instructions at
https://pcbs.readthedocs.io/en/latest/software-installation.html#instructions-for-linux-ubuntu-20-04
)
On Mon, Mar 28, 2022 at 3:38 PM Oliver Lindemann ***@***.***> wrote:
@chrplr <https://github.com/chrplr> thanks a lot for your comments.
Yes, you are right we cannot say "expyriment is broken under Linux", just
the pip installation is broken. It's just difficult to work with virtual
environments, if you have to install pygame via apt. The upcoming version
0.11 should however solve all this issues.
—
Reply to this email directly, view it on GitHub
<#178 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALVWMVAQC76IEKYNSJEEGLVCGY6XANCNFSM5EG2A3QA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
To be more precise, it seems to me that under Ubuntu, the issue occurs if one installs pygame with "pip install pygame" (which installs pygame2). Then one has the wrong libraries for SDL,... and dependency hell occurs ... Yet if one installs pygame with "apt install python3-pygame", 1.9.6 is installed with all the correct dependencies and "pip expyriment" works like a charm. (I have just installed it without problem on a pristine Ubuntu 20.04 distrib, following my own instructions at https://pcbs.readthedocs.io/en/latest/software-installation.html#instructions-for-linux-ubuntu-20-04 ) …
-- Christophe Pallier (http://www.pallier.org) INSERM Cognitive Neuroimaging Lab (http://www.unicog.org)
On Mon, Mar 28, 2022 at 3:38 PM Oliver Lindemann @.> wrote: @chrplrhttps://github.com/chrplr thanks a lot for your comments. Yes, you are right we cannot say "expyriment is broken under Linux", just the pip installation is broken. It's just difficult to work with virtual environments, if you have to install pygame via apt. The upcoming version 0.11 should however solve all this issues. — Reply to this email directly, view it on GitHub <#178 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALVWMVAQC76IEKYNSJEEGLVCGY6XANCNFSM5EG2A3QA . You are receiving this because you were mentioned.Message ID: @.>
While that is true for Debian-based distributions, other more "state-of-the-art" kind of distros (e.g. Arch) will most likely not have 1.9.6 available anymore.
The problem also extends to Windows and MacOS. Under Windows, for example, Pygame versions < 2 are only available for Python <= 3.7. For a recent Python 3.10 there is only Pygame 2 available (at least on PyPi).
Indeed. My encounter with the issue started with MacOSX.
I totally agree a move to pygame2 would be good for expyriment. If I can
help in one way or another (e.g. testing) just let me know.
I use SDL2 in C and I recognize that is a great improvement over SDL1.2.
For example, it can work with multiple screen setups.
I do not know if they implemented this in pygame2, but this might solve a
stupid issue that I have with expyriment: when you have a dual monitor
setup, in fullscreen mode, it splits the display over the two screens. It
would be nicer if it experiment always satyed on a single screen in
fullscreen mode.
To be more precise, it seems to me that under Ubuntu, the issue occurs if
one installs pygame with "pip install pygame" (which installs pygame2).
Then one has the wrong libraries for SDL,... and dependency hell occurs ...
Yet if one installs pygame with "apt install python3-pygame", 1.9.6 is
installed with all the correct dependencies and "pip expyriment" works like
a charm. (I have just installed it without problem on a pristine Ubuntu
20.04 distrib, following my own instructions at
https://pcbs.readthedocs.io/en/latest/software-installation.html#instructions-for-linux-ubuntu-20-04
)
… <#m_-7884999302438685531_>
-- Christophe Pallier (http://www.pallier.org) INSERM Cognitive
Neuroimaging Lab (http://www.unicog.org)
On Mon, Mar 28, 2022 at 3:38 PM Oliver Lindemann *@*.*> wrote: @chrplr
<https://github.com/chrplr> https://github.com/chrplr
<https://github.com/chrplr> thanks a lot for your comments. Yes, you are
right we cannot say "expyriment is broken under Linux", just the pip
installation is broken. It's just difficult to work with virtual
environments, if you have to install pygame via apt. The upcoming version
0.11 should however solve all this issues. — Reply to this email directly,
view it on GitHub <#178 (comment)
<#178 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALVWMVAQC76IEKYNSJEEGLVCGY6XANCNFSM5EG2A3QA
<https://github.com/notifications/unsubscribe-auth/AALVWMVAQC76IEKYNSJEEGLVCGY6XANCNFSM5EG2A3QA>
. You are receiving this because you were mentioned.Message ID: @.*>
While that is true for Debian-based distributions, other more
"state-of-the-art" kind of distros (e.g. Arch) will most likely not have
1.9.6 available anymore.
The problem also extends to Windows and MacOS. Under Windows, for example,
Pygame versions < 2 are only available for Python <= 3.7. For a recent
Python 3.10 there is only Pygame 2 available (at least on PyPi).
—
Reply to this email directly, view it on GitHub
<#178 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALVWMUHEXQZGKACHUWAVRLVCHMCDANCNFSM5EG2A3QA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
I am not sure if pygame2 will "save the day". Contrary to what I wrote above, it does not seem to always rely on opengl, and even when it does, it does not necessarily work as expected. The following tests of blocking on displya flip work fine with the current version of expyriment, while, (on my computer at least) the pure pygame version (using pygam 2.1.2) does not block on vsync.
Indeed, Pygame will not block on the vertical retrace. I think the idea there is merely to enable vsync (i.e. internally, the video card will only update when it is at the left top corner, so you shouldn't see tearing, but it will not block, i.e. the reported times are meaningless). It should be comparable to our current OpenGL mode 1, and we could think about changing this mode to not use OpenGL.
Activity
fladd commentedon Sep 17, 2021
We should see if we can easily switch to Pygame 2. I intended to make that switch only as part of the next major version (i.e. 1.0), but we might want to release a 0.11.0 that supports it already sooner.
lindemann09 commentedon Nov 7, 2021
We should do that soon, because Expyriment is currently broken for Linux user. That is really bad.
chrplr commentedon Nov 7, 2021
My current workaround, for Ubuntu 20.04 LTS (using
setup.py installfrom source, rather thanpip install)Expyriment seems to be working fine with pygame2.0.3, but I have not checked extensively to be able to confirm that it does not break anoything.
From my gist: https://gist.github.com/chrplr/61ec2de7f0e001ebf65aec89e6f6ddc9
(On MacOSX: we temporally install pygame1.9.6 to satisfy pip install expyriment, then force upgrade to pygame2 (https://pcbs.readthhttps://pcbs.readthedocs.io/en/latest/software-installation.html#the-pygame-and-expyriment-python-modulesedocs.io/en/latest/software-installation.html#the-pygame-and-expyriment-python-modules)
chrplr commentedon Nov 8, 2021
Coming back to the issue with sdl-config. It is due to the installation of pygame missing the libsdl*1.2-dev packages.
chrplr commentedon Nov 8, 2021
Pygame2 relies on sdl2, where everything under the hood is using opengl. Maybe the pyopengl code in expyriment would no longer be necessary to achieve the same performance (?)
fladd commentedon Nov 8, 2021
It might be possible. I have not looked at Pygame/SDL 2 yet. We mainly need OpenGL for blocking on the vertical retrace. If this is now possible in Pygame 2 natively, then indeed we might be able to drop OpenGL.
lindemann09 commentedon Mar 25, 2022
@fladd Have you had a look into it already? Would be great, if Exypriment is running again on Linux out of the box.
chrplr commentedon Mar 27, 2022
chrplr commentedon Mar 27, 2022
lindemann09 commentedon Mar 28, 2022
@chrplr thanks a lot for your comments.
Yes, you are right we cannot say "expyriment is broken under Linux", just the pip installation is broken. It's just difficult to work with virtual environments, if you have to install pygame via apt. The upcoming version 0.11 should however solve all this issues.
chrplr commentedon Mar 28, 2022
fladd commentedon Mar 28, 2022
While that is true for Debian-based distributions, other more "state-of-the-art" kind of distros (e.g. Arch) will most likely not have 1.9.6 available anymore.
The problem also extends to Windows and MacOS. Under Windows, for example, Pygame versions < 2 are only available for Python <= 3.7. For a recent Python 3.10 there is only Pygame 2 available (at least on PyPi).
chrplr commentedon Mar 28, 2022
chrplr commentedon May 14, 2022
I am not sure if pygame2 will "save the day". Contrary to what I wrote above, it does not seem to always rely on opengl, and even when it does, it does not necessarily work as expected. The following tests of blocking on displya flip work fine with the current version of expyriment, while, (on my computer at least) the pure pygame version (using pygam 2.1.2) does not block on vsync.
tearing_tests.zip
fladd commentedon Jun 14, 2022
Indeed, Pygame will not block on the vertical retrace. I think the idea there is merely to enable vsync (i.e. internally, the video card will only update when it is at the left top corner, so you shouldn't see tearing, but it will not block, i.e. the reported times are meaningless). It should be comparable to our current OpenGL mode 1, and we could think about changing this mode to not use OpenGL.
fladd commentedon Jun 14, 2022
@lindemann09 Is the package
libfreetype6-devstill needed under Debian with Pygame2?fladd commentedon Aug 30, 2024
I tested this on Anti Linux 23.1 (based on Debian 12), and it seems that this is not needed.