Open arnohakk opened 5 years ago
Hi Arne,
There isn't a day that I don't think asbout it. (Usually after waking up from a stress dream that includes the Python clock.)
In fact, @jooh made a first stab at it a while back (see this pull request. From local testing by colleagues, this seems to work, at least with EyeLink.
I haven't found the time to properly focus on this, but applaud and am happy to support any thorough attempt. In general, there shouldn't be a lot that isn't currently compatible with Python 3, I think. However, going over the whole codebase to double-check, and even checking the whole codebase after an automated pass-through, will probably be quite a bit of work,
Cheers, Edwin
Hi Edwin,
Maybe if you split up the codebase, a couple of people can do a part of the manual checking? I volunteer to do a part. Is the opensesame plugin part already py3 compatible?
Cheers, Bob
The time is now... https://www.python.org/doc/sunset-python-2/
Hey, I just saw that there was an update to Python3 :) What do I have to consider when moving to this new version, e.g. dependencies?
Yassss, we finally did it! Sorry it took a while, this ended up being more effort than I had hoped, especially when having to test on various platforms. Specific dependencies below.
TL;DR: Your Python 2 code should work on Python 3 as far as PyGaze functions go. Obviously you'll have to make sure that Python-specific things are converted (e.g. raw_input
to input
), but PyGaze shouldn't give you any grief.
PS: Don't update a working experiment! If you're still collecting data, wait with changing stuff until you're finished! Also, Python 3 can exist alongside Python 2, either as local installs or as conda environments. So I would strongly recommend trying to get your Python 3 environment up and running alongside your currently running Python 2 environment.
Oh, I forgot to mention! There is still a Python 2.7 snapshot that people can still contribute to if they find any bugs. It's in a branch called python27
: https://github.com/esdalmaijer/PyGaze/tree/python27
If you're wanting to install this older snapshot in a Python 2 environment, simply run:
pip install python-pygaze=0.6.5
I'm planning on getting started with this sometime this week and while I do have conda setup I'd strongly prefer to use everything with with Python3 (as python 2 is now EOL). After skimming above seems to be at a reasonable stage.
The same as for Python 2, essentially :)
Generally:
pip install numpy scipy matplotlib pillow
Add PyGame:
pip install pygame
Add PsychoPy and its dependencies:
pip install psychopy
If you're wanting to use a GazePoint tracker:
pip install lxml
And for Tobii:
pip install tobii_research
For EyeLink, there is a Python3 version of pylink available, but you'll have to request it from SR Research. (Their support forum is a great venue to do so, and I think they might even have it available directly through there. You'll have to make an account, but it's free.)
The one point you should consider with Tobii, is that tobii_research
currently only supports Python 3.5. See: https://pypi.org/project/tobii-research/
Should I setup some conda or virtual env for this then? I'm using the Tobii 4c and Ubuntu 18.04.
Can you put this on the main website or documentation somewhere since I felt all the instructions are made with Python2 in mind?
I will setup the following after making sure I am on python==3.5
pip install numpy scipy matplotlib pillow
pip install pygame
pip install psychopy
pip install tobii_research
Will there be any other pieces of setup I have to do?
The one point you should consider with Tobii, is that
tobii_research
currently only supports Python 3.5. See: https://pypi.org/project/tobii-research/
In fact Tobii-research also supports 3.6.0. as I just was informed by the Tobii support. The information on PyPi is probably not updated. I tried it out under 3.6.0 and it works. Maybe this helps people with the same issue as me wondering how PsychoPy and Tobii-research can work together if the support different Python versions.
Hey,
when just reinstalling our system, Python 2.7 told me that it is getting towards the end of its life cycle.
As a Tobii User, I found that the new SDK supports Python 3.X and 64bit systems, same holds true for PsychoPy. I don't know about the other manufactures SDKs though.
@esdalmaijer Do you think about migrating to Python 3.X 64 bit? I think we (with the help of Tobii, who are usually interested in giving researchers this kind of support) could help from the Tobii SKD side and also do some testing.
Cheers,
Arne