Wie man CMake-Fehler behebt: wxPython/Phoenix does not appear to be installed on the system

Problem

Beim Versuch, Software mit CMake zu kompilieren, siehst du eine Fehlermeldung wie:

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)

Lösung

CMake überprüft im Wesentlichen, ob du das Python-Paket wx installiert hast.

Um es zu installieren, verwende

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

Wenn das nicht funktioniert, überprüfe, ob du mehrere Python-Versionen installiert hast


Ähnliche Beiträge nach Kategorie: CMake, Python