Cannot run esp_prov.py: No module named 'google'
Posted: Mon Jul 15, 2024 9:35 pm
Using a fresh build of the ESP IDF 5.2 shell under Windows 11, I have built and flashed the code in
https://github.com/espressif/esp-idf/tr ... i_prov_mgr
on an ESP32-C3. It compiles and runs without error.
Now I would like to communicate with the wifi_prov_mgr app using the esp_prov.py code from:
https://github.com/espressif/esp-idf/tr ... sp_prov.py
But:
What am I missing? Or what additional info would help debug the problem?
https://github.com/espressif/esp-idf/tr ... i_prov_mgr
on an ESP32-C3. It compiles and runs without error.
Now I would like to communicate with the wifi_prov_mgr app using the esp_prov.py code from:
https://github.com/espressif/esp-idf/tr ... sp_prov.py
But:
Code: Select all
PS C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov> python esp_prov.py --transport ble --service_name PROV_3E4530 --sec_ver 2 --sec2_username wifiprov --sec2_pwd abcd1234 --ssid xxxxxxxxx --passphrase xxxxxxxxxxxxx
Traceback (most recent call last):
File "C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov\esp_prov.py", line 17, in <module>
import prov
File "C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov\prov\__init__.py", line 6, in <module>
from .wifi_ctrl import * # noqa F403
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov\prov\wifi_ctrl.py", line 7, in <module>
import proto
File "C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov\proto\__init__.py", line 27, in <module>
constants_pb2 = _load_source('constants_pb2', idf_path + '/components/protocomm/python/constants_pb2.py')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov\proto\__init__.py", line 20, in _load_source
spec.loader.exec_module(module)
File "C:\Espressif\frameworks\esp-idf-v5.2.2/components/protocomm/python/constants_pb2.py", line 5, in <module>
from google.protobuf.internal import builder as _builder
ModuleNotFoundError: No module named 'google'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov\esp_prov.py", line 26, in <module>
import prov
File "C:\Espressif\frameworks\esp-idf-v5.2.2/tools/esp_prov\prov\__init__.py", line 6, in <module>
from .wifi_ctrl import * # noqa F403
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Espressif\frameworks\esp-idf-v5.2.2/tools/esp_prov\prov\wifi_ctrl.py", line 7, in <module>
import proto
File "C:\Espressif\frameworks\esp-idf-v5.2.2/tools/esp_prov\proto\__init__.py", line 27, in <module>
constants_pb2 = _load_source('constants_pb2', idf_path + '/components/protocomm/python/constants_pb2.py')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Espressif\frameworks\esp-idf-v5.2.2/tools/esp_prov\proto\__init__.py", line 20, in _load_source
spec.loader.exec_module(module)
File "C:\Espressif\frameworks\esp-idf-v5.2.2/components/protocomm/python/constants_pb2.py", line 5, in <module>
from google.protobuf.internal import builder as _builder
ModuleNotFoundError: No module named 'google'
PS C:\Espressif\frameworks\esp-idf-v5.2.2\tools\esp_prov>