I can't use any Anki version

I’m not sure but maybe Anki 2.1.15 will work out-of-the-box.

Also try running Anki from pip to provide a bit more maybe useful information, or maybe it’ll be a dead end.

To do it,

  1. Install Python 3.8 or 3.9 from https://www.python.org/

    During the installation process, mark the checkbox “Add Python 3.8 to PATH”.

  2. Open a Command Prompt window (“cmd”).

  3. Install Anki - https://github.com/ankitects/anki/blob/main/docs/development.md#pre-built-python-wheels

  4. Open C:\pyenv\Lib\site-packages\waitress\trigger.py in any text editor (Sublime Text, Visual Studio Code, Notepad++, …) and replace lines #202-203

            def _physical_pull(self):
                self.trigger.send(b"x")
    

    with:

            def _physical_pull(self):
                print(self.trigger)
                self.trigger.send(b"x")
    
  5. Save the edited file and run Anki with \pyenv\scripts\anki

The console window will contain a couple of lines similar to

<socket.socket fd=1360, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=(‘127.0.0.1’, 55433), raddr=(‘127.0.0.1’, 55432)>

but in your case it probably will be something else, maybe

<socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0>

I’m not sure what to do next in this case. Maybe try to turn off your antivirus or firewall, if you use any, or maybe try to run a few tests by downloading a slight modified version of waitress/tests/test_server.py at 4b6b5832f3a30d82dc8cb359cf04d2a8edf6712b · Pylons/waitress · GitHub from https://gist.github.com/kelciour/8186c66d891f20866fa24053bc074aca and run it with cmd using \pyenv\Scripts\python "<path to the file>\test_server.py" -v

For example, by typing first \pyenv\Scripts\python , then drag-and-dropping test_server.py from the Explorer and adding -v

1 Like