01 icon indicating copy to clipboard operation
01 copied to clipboard

windows WSL set up instructions

Open jadbox opened this issue 1 year ago • 4 comments

I'd love to give this a try on Windows 11 if I could figure out how to get desktop recording to work.

jadbox avatar Mar 21 '24 17:03 jadbox

You mean audio? I also gave up at this point ^^ I think Pulseaudio might be a starting point, and then stream the audio to the WSL machine?

cutmasta-kun avatar Mar 21 '24 22:03 cutmasta-kun

you can follow the exact installation steps, but you need to first homebrew and poetry. not sure if it will work, because wsl doesn't have access to audio input and a display. but sure you can give it a try. (didn't work because access to audio input and a display was not available)

shahdivax avatar Mar 24 '24 14:03 shahdivax

Hi, I came to the point poetry install It fails at:

 building 'simpleaudio._simpleaudio' extension
  creating build/temp.linux-x86_64-cpython-311
  creating build/temp.linux-x86_64-cpython-311/c_src
  gcc -pthread -B /home/user1/miniconda3/envs/01/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/user1/miniconda3/envs/01/include -fPIC -O2 -isystem /home/user1/miniconda3/envs/01/include -fPIC -DDEBUG=0 -I/tmp/tmpd_0zomgx/.venv/include -I/home/user1/miniconda3/envs/01/include/python3.11 -c c_src/posix_mutex.c -o build/temp.linux-x86_64-cpython-311/c_src/posix_mutex.o
  gcc -pthread -B /home/user1/miniconda3/envs/01/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/user1/miniconda3/envs/01/include -fPIC -O2 -isystem /home/user1/miniconda3/envs/01/include -fPIC -DDEBUG=0 -I/tmp/tmpd_0zomgx/.venv/include -I/home/user1/miniconda3/envs/01/include/python3.11 -c c_src/simpleaudio.c -o build/temp.linux-x86_64-cpython-311/c_src/simpleaudio.o
  c_src/simpleaudio.c: In function ‘_play_buffer’:
  c_src/simpleaudio.c:164:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
    164 |     PyEval_InitThreads();
        |     ^~~~~~~~~~~~~~~~~~
  In file included from /home/user1/miniconda3/envs/01/include/python3.11/Python.h:95,
                   from c_src/simpleaudio.h:10,
                   from c_src/simpleaudio.c:7:
  /home/user1/miniconda3/envs/01/include/python3.11/ceval.h:132:37: note: declared here
    132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
        |                                     ^~~~~~~~~~~~~~~~~~
  gcc -pthread -B /home/user1/miniconda3/envs/01/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/user1/miniconda3/envs/01/include -fPIC -O2 -isystem /home/user1/miniconda3/envs/01/include -fPIC -DDEBUG=0 -I/tmp/tmpd_0zomgx/.venv/include -I/home/user1/miniconda3/envs/01/include/python3.11 -c c_src/simpleaudio_alsa.c -o build/temp.linux-x86_64-cpython-311/c_src/simpleaudio_alsa.o
  c_src/simpleaudio_alsa.c:8:10: fatal error: alsa/asoundlib.h: No such file or directory
      8 | #include <alsa/asoundlib.h>
        |          ^~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1


  at ~/miniconda3/envs/01/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
      160│
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│
      163│             if error is not None:
    → 164│                 raise error from None
      165│
      166│             return path
      167│
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with simpleaudio (1.0.4) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "simpleaudio (==1.0.4)"'.

W11, WSLg is installed and working. Any suggestions?

kbfifi avatar Mar 25 '24 19:03 kbfifi

Fixed the issue above by: sudo apt-get install libasound-dev sudo apt install portaudio19-dev

Now poetry install finishes successfully

Next issue is related to X11. As I understand it WSLg supports Wayland and apparently this project does not. Is there a simple workaround?

(01) user1@i9:~/OpenInterpreter/01/software$ poetry run 01 --local


○

Starting...


Traceback (most recent call last):
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/xauth.py", line 43, in __init__
    raw = open(filename, 'rb').read()
          ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/user1/.Xauthority'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user1/miniconda3/envs/01/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/user1/OpenInterpreter/01/software/start.py", line 9, in <module>
    from source.server.server import main
  File "/home/user1/OpenInterpreter/01/software/source/server/server.py", line 110, in <module>
    interpreter = configure_interpreter(interpreter)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user1/OpenInterpreter/01/software/source/server/i.py", line 218, in configure_interpreter
    __import__(package)
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/pywinctl/__init__.py", line 27, in <module>
    from ._main import (Re, Window, checkPermissions, getActiveWindow,
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/pywinctl/_main.py", line 14, in <module>
    from pymonctl import findMonitorsAtPoint, getAllMonitors, getAllMonitorsDict
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/pymonctl/__init__.py", line 22, in <module>
    from ._main import (getAllMonitors, getAllMonitorsDict, getMonitorsCount, getPrimary,
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/pymonctl/_main.py", line 916, in <module>
    from ._pymonctl_linux import (_getAllMonitors, _getAllMonitorsDict, _getMonitorsCount, _getPrimary,
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/pymonctl/_pymonctl_linux.py", line 22, in <module>
    from ewmhlib import defaultEwmhRoot, getProperty, getPropertyValue, getRoots, getRootsInfo, Props
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/ewmhlib/__init__.py", line 23, in <module>
    from ._main import (displaysCount, getDisplays, getDisplaysInfo, getRoots, getRootsInfo,
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/ewmhlib/_main.py", line 4, in <module>
    from ._ewmhlib import (displaysCount, getDisplays, getDisplaysInfo, getRoots, getRootsInfo,
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/ewmhlib/_ewmhlib.py", line 30, in <module>
    defaultDisplay: Xlib.display.Display = Xlib.display.Display()
                                           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/protocol/display.py", line 60, in __init__
    auth_name, auth_data = connect.get_auth(self.socket,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/support/connect.py", line 91, in get_auth
    return mod.get_auth(sock, dname, host, dno)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/support/unix_connect.py", line 103, in new_get_auth
    au = xauth.Xauthority()
         ^^^^^^^^^^^^^^^^^^
  File "/home/user1/miniconda3/envs/01/lib/python3.11/site-packages/Xlib/xauth.py", line 45, in __init__
    raise error.XauthError('~/.Xauthority: %s' % err)
Xlib.error.XauthError: ~/.Xauthority: [Errno 2] No such file or directory: '/home/user1/.Xauthority'

kbfifi avatar Mar 26 '24 16:03 kbfifi

If anyone is still having issues with WSL please update to the latest version by pulling the most recent changes. We have had several pull requests merged to get the 01 server running on windows. I'm going to close this issue, if you still experience issues please make a new issue with more information.

tyfiero avatar Apr 02 '24 19:04 tyfiero

Anyone get this sorted out. Still stuck on the same issue as OP.

zheroz00 avatar May 16 '24 18:05 zheroz00