Closed NightDragon1 closed 4 years ago
@NightDragon1 I was stuck with the same error but managed to get around it by entering the container and manually installing setuptools before running build.
Instead of
docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build build
do
docker run --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build /bin/bash
then from inside the container do pip install setuptools
followed by build
to build the firmware.
That's an interesting observation, thanks. The build does run a pip install
for the all the modules the ESP-IDF requires as per
I'm wondering why it's not installing setuptools then.
I believe I have found the problem, take a look: https://github.com/pypa/pip/issues/25
Either way, by removing setuptools from the requirements.txt
and instead adding a line to /opt/build-esp32
to install it separately beforehand it works.
Python isn't my home turf but I still don't get it - besides, I can't reproduce the problem. Why isn't everybody else having this issue?
Are both of you using the latest version of the Docker image (ensure by running docker pull marcelstoer/nodemcu-build
) and the NodeMCU dev-esp32
branch?
In the upstream ESP-IDF requirements.txt
between v3.3.1 and master is only marginally different.
Whatever the root cause (or my lack of understanding thereof) it's easy enough to just add that line to the ESP32 build script.
I'm getting very similar setuptools error messages on Ubuntu 22.04 LTS (Jammy) (x86_64) and Raspberry Pi 4b (Armbian aarch64) for the docker image. So my original goal was getting docker working on arm64, then build nodemcu, and finally for flashing hardware connected to the RPI4b.
When I try to explicitly install setuptools by Dockerfile I get this error:
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/0c/f0/f11edc0efc7b00e26a28225621ce7584636bb3a76b1862829d42bc146fbf/setuptools-62.4.0.tar.gz (2.6MB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "setuptools/__init__.py", line 8, in <module>
import _distutils_hack.override # noqa: F401
File "_distutils_hack/override.py", line 1, in <module>
__import__('_distutils_hack').do_override()
File "_distutils_hack/__init__.py", line 72, in do_override
ensure_local_distutils()
File "_distutils_hack/__init__.py", line 55, in ensure_local_distutils
importlib.import_module('distutils')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
AttributeError: DistutilsMetaFinder instance has no attribute 'find_module'
I'm wondering if there would be an openness to trying a PR for a newer version of Ubuntu (with newer pip, etc.) if building nodemcu seems to work?
Hi! Just tried to make a build for esp32. I get the following issue:
What am I missing?