New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unable to run "sdl-config"" during Linux installation (e.g. Ubuntu 20.04+) #178
Comments
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. |
We should do that soon, because Expyriment is currently broken for Linux user. That is really bad. |
My current workaround, for Ubuntu 20.04 LTS (using
From my gist: https://gist.github.com/chrplr/61ec2de7f0e001ebf65aec89e6f6ddc9 |
Coming back to the issue with sdl-config. It is due to the installation of pygame missing the libsdl*1.2-dev packages. |
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. |
@fladd Have you had a look into it already? Would be great, if Exypriment is running again on Linux out of the box. |
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:
***@***.***>
|
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:
> ***@***.***>
>
|
@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. |
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:
@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:
***@***.***>
|
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.
…--
Christophe Pallier (http://www.pallier.org)
INSERM Cognitive Neuroimaging Lab (http://www.unicog.org)
On Mon, Mar 28, 2022 at 6:21 PM Florian Krause ***@***.***>
wrote:
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. |
@lindemann09 Is the package |
Installing Expyriment (i.e. Pygame<1.9) requires under Debian also the manual installation of the package:
libfreetype6-dev
.Documentation should be updated.
The text was updated successfully, but these errors were encountered: