Como corrigir erro CMake: wxPython/Phoenix does not appear to be installed on the system

Problema

Ao tentar compilar software usando CMake, você vê uma mensagem de erro como:

cmake_wxpython_error.txt
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'wx'
CMake Error at cmake/FindwxPython.cmake:56 (message):
  wxPython/Phoenix does not appear to be installed on the system
Call Stack (most recent call first):
  CMakeLists.txt:1004 (find_package)

Solução

O CMake basicamente verifica se você tem o pacote Python wx instalado.

Para instalá-lo, use

install_wxpython.sh
pip install --user --break-system-packages wxpython

Se isso não funcionar, verifique se você tem múltiplas versões do Python instaladas


Check out similar posts by category: CMake Python