mainsail-crew / virtual-klipper-printer

Run a simulated Klipper 3D-Printer in a Docker container
GNU General Public License v3.0
68 stars 32 forks source link

ModuleNotFoundError: No module named 'distutils' during docker compose #37

Closed tg73 closed 2 months ago

tg73 commented 2 months ago

While running docker compose up -d as per the instructions, I get this. Please let me know if you need other info.

image

17.84 [ 80%] Building CXX object app/CMakeFiles/simulavr.dir/main.cpp.o
18.20 [ 80%] Building CXX object app/CMakeFiles/simulavr.dir/gdbserver.cpp.o
18.51 [ 84%] Building CXX object app/CMakeFiles/simulavr.dir/__/libsimulavr/ui.cpp.o
18.72 [ 84%] Building CXX object app/CMakeFiles/simulavr.dir/__/libsimulavr/mysocket.cpp.o
18.83 [ 88%] Linking CXX executable simulavr
18.87 [ 88%] Built target simulavr
18.88 [ 92%] Generating timestamp
18.88 Traceback (most recent call last):
18.88   File "/build/simulavr/build/pysimulavr/setup.py", line 3, in <module>
18.88     from setuptools import setup
18.88 ModuleNotFoundError: No module named 'setuptools'
18.88
18.88 During handling of the above exception, another exception occurred:
18.88
18.88 Traceback (most recent call last):
18.88   File "/build/simulavr/build/pysimulavr/setup.py", line 5, in <module>
18.88     from distutils.core import setup
18.88 ModuleNotFoundError: No module named 'distutils'
18.89 make[3]: *** [pysimulavr/CMakeFiles/pysimulavr.dir/build.make:76: pysimulavr/timestamp] Error 1
18.89 make[2]: *** [CMakeFiles/Makefile2:456: pysimulavr/CMakeFiles/pysimulavr.dir/all] Error 2
18.89 make[1]: *** [Makefile:136: all] Error 2
18.89 make: *** [Makefile:49: build] Error 2
------
failed to solve: process "/bin/sh -c git clone -b master https://git.savannah.nongnu.org/git/simulavr.git     && cd klipper     && cp /usr/src/simulavr.config .config     && make PYTHON=python3     && cp out/klipper.elf /build/simulavr.elf     && rm -f .config     && make PYTHON=python3 clean     && cd ../simulavr     && make python     && make build     && make clean" did not complete successfully: exit code: 2
tg73 commented 2 months ago

This has fixed it for me, but I have no idea if this is the right way to fix it (monkey+keyboard), so no PR at this time. https://github.com/tg73/virtual-klipper-printer/tree/fix-issue-37