Windows install tutor docker-compose error

Hi,
got win 10, python 3.8, pip, lybyaml, docker (+wsl 2) and docker-compose. So, tutor local quickstart gets an error:

docker-compose -f C:\Users\administrator\AppData\Local\tutor\tutor\env\local\docker-compose.yml -f C:\Users\administrator\AppData\Local\tutor\tutor\env\local\docker-compose.prod.yml --project-name tutor_local stop
Traceback (most recent call last):
  File "docker\api\client.py", line 214, in _retrieve_server_version
  File "docker\api\daemon.py", line 181, in version
  File "docker\utils\decorators.py", line 46, in inner
  File "docker\api\client.py", line 237, in _get
  File "requests\sessions.py", line 543, in get
  File "requests\sessions.py", line 530, in request
  File "requests\sessions.py", line 643, in send
  File "requests\adapters.py", line 439, in send
  File "urllib3\connectionpool.py", line 670, in urlopen
  File "urllib3\connectionpool.py", line 392, in _make_request
  File "http\client.py", line 1255, in request
  File "http\client.py", line 1301, in _send_request
  File "http\client.py", line 1250, in endheaders
  File "http\client.py", line 1010, in _send_output
  File "http\client.py", line 950, in send
  File "docker\transport\npipeconn.py", line 32, in connect
  File "docker\transport\npipesocket.py", line 23, in wrapped
  File "docker\transport\npipesocket.py", line 72, in connect
  File "docker\transport\npipesocket.py", line 52, in connect
pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 81, in main
  File "compose\cli\main.py", line 200, in perform_command
  File "compose\cli\command.py", line 60, in project_from_options
  File "compose\cli\command.py", line 152, in get_project
  File "compose\cli\docker_client.py", line 41, in get_client
  File "compose\cli\docker_client.py", line 170, in docker_client
  File "docker\api\client.py", line 197, in __init__
  File "docker\api\client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
[13832] Failed to execute script docker-compose

Looks like the problem in relative paths (…/… etc.) in docker-compose.yml:

  mongodb-permissions:
    image: docker.io/overhangio/openedx-permissions:13.1.0
    command: ["999", "/data/db"]
    restart: on-failure
    volumes:
      - ../../data/mongodb:/data/db

Any idea how to fix it?

My bad, just forget launch Docker Desktop

1 Like

So, can you confirm that Tutor works with your Windows setup? Are there any Windows-specific instructions or did it work out of the box?

Yes, on Windows 10 1903 or 21H develop’s setup works well with all prerequisites are satisfied (python 3.8 and pip, wsl 2, docker desktop and PyYAML-5.3.1-cp38-cp38-win_amd64.whl by Index of /download/pyyaml/)

Would you be willing to write a tutorial on how to run tutor on windows? I would really love to add such a tutorial to the docs.

Yes, I will gladly do it, but a little bit later

Done! So, hope this will be helpfull:
Windows 10 Tutor Installation

  1. Install WSL 2
    For Windows 10 2004+ in PowerShell with admin rigths:
	wsl --install

For Windows 10 1903+ (build 18362+) use Microsoft guide [Manual installation steps for older versions of WSL | Microsoft Docs]

  1. Install Docker Desktop [Docker Desktop for Mac and Windows | Docker]
    Requirements: Windows 10 Pro/Enterprise/Home (18363+)

  2. Install Python 3.8 [Python Release Python 3.8.0 | Python.org]
    Check “add to PATH” and “pip” option

  3. Install PyYAML
    Download PyYAML-5.3.1-cp38-cp38-win_amd64.whl or any for you python version and architecture from Index of /download/pyyaml/
    Then in CMD with admin rights:

		cd C:\path\to\downloads\
		pip install PyYAML-5.3.1-your-version.whl
Note: use pip3 if you have python2 on your Windows
  1. Reboot

Now you can install Tutor from the Github repository [GitHub - overhangio/tutor: The docker-based Open edX distribution designed for peace of mind]:
Download ZIP rep and unpack them
Then in CMD with admin rights:

		cd C:\path\to\downloads\tutor-master 
		pip install -e .

Note: don’t forget launch Docker Desktop (with engine started successfully) until use tutor in CMD

Now I faced up with mismatch of versions pyyaml (kubernetes 21.7.0 needs pyyaml>=5.4.1). So, we need change link for pyyaml and packet version in this tutorial:
4. Install PyYAML
Download PyYAML‑5.4.1‑cp38‑cp38‑win_amd64.whl or any for you python version and architecture from Python Extension Packages for Windows - Christoph Gohlke

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.