Apart some SDL error I got in Pygame but that should not have anything to do…
If I try to run Lutris, for example I get this message:
File "/usr/bin/lutris", line 52, in <module>
from lutris.gui.application import Application # pylint: disable=no-name-in-module
File "/usr/lib/python3.10/site-packages/lutris/gui/application.py", line 36, in <module>
from lutris.api import parse_installer_url, get_runners
File "/usr/lib/python3.10/site-packages/lutris/api.py", line 9, in <module>
import requests
File "/home/nuno/.local/lib/python3.10/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 29, in <module>
from .connection import (
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/connection.py", line 39, in <module>
from .util.ssl_ import (
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/util/__init__.py", line 3, in <module>
from .connection import is_connection_dropped
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 3, in <module>
from .wait import wait_for_read
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/util/wait.py", line 1, in <module>
from .selectors import (
File "/home/nuno/.local/lib/python3.10/site-packages/urllib3/util/selectors.py", line 14, in <module>
from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
While the first few lines are or appear to be Lutris related what concerns me is the problem with finding stuff on the python3.10 site_packages… Am I missing some package? Did I overwrote something with Pip or…?
So, with a quick search, it looks the issue here isn’t with your python install.
The issue is this
from collections import namedtuple, Mapping
This is a python 3.9 import so I assume lutris is expecting python 3.9. Apparently collections interface changed in python 3.10 so it has to be like this now
from collections.abc import Mapping
A virtual env here would be perfect to handle this, if you’ve followed the virtualenvwrapper guide I posted above then you can do this.
mkvirtualenv -p python3.9 lutris_playground
This will create a virtual env with python 3.9 and it’ll work as it should.