Kicad could not determine wxpython version

image

I used Phoenix wxPython which I downloaded wxPython-4.2.1.tar.gz asset from github.

The commands I used to build wxPython are below:
cd wxPython-4.2.1
pip install -r requirements.txt
python build.py build_py
python build.py install_py

The commands I used to build wxWidgets built in Phoenix wxPython are below:
cd wxPython-4.2.1/ext/wxWidgets
mkdir buildX
cd buildX
cmake …/
make -j$(nproc)
sudo make install

The commands I used to build kicad are below:
cd kicad
mkdir build
cd build

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKICAD_USE_EGL=1 -DwxWidgets_ROOT_DIR=/usr/local -DPYTHON_EXECUTABLE=$(which python) -DKICAD_SCRIPTING_WXPYTHON=ON -DPYTHON_SITE_PACKAGE_PATH=$PYTHONPATH …/

Environment Variable I set before install kicad
export WX_CONFIG=/usr/local/bin/wx-config
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/account/miniconda3/envs/py38/lib/python3.8/site-packages:$PYTHONPATH

(py38 is my conda environment, use python 3.8)

After using the above command, I still receive the following error message:
Could not determine wxPython version. Python plugin will not be available.

By the way, I didn’t use pip install wxPython.
How can I resolve it?

You shouldn’t mess up with pip and manual installation of dependencies.

2 Likes

Thanks @eelik .

I followed the tutorial from the link and succeeded. However, the -DKICAD_USE_EGL option must be set to 0; otherwise, errors occur.
make[2]: *** [common/gal/CMakeFiles/gal.dir/build.make:380: common/gal/CMakeFiles/gal.dir/opengl/opengl_gal.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3238: common/gal/CMakeFiles/gal.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

Will setting -DKICAD_USE_EGL to 0 or 1 have a significant impact on KiCad’s functionality?

It shouldn’t have, it’s related to the windowing system backend and/or graphics rendering. If everything seems to work well for you, then it’s good.

1 Like

Hi,
I have a same issue - “Kicad could not determine wxpython version” - can’t use any plugins because of that.
My configuration is (btw I tried with the stable version too - same thing):

Application: KiCad x86_64 on x86_64
Version: 8.99.0-unknown-05b2b3c26e~178~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.10.1
HarfBuzz 2.6.4
FontConfig 2.13.1
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Ubuntu 20.04.6 LTS, 64 bit, Little endian, wxGTK, X11, ubuntu, x11
Build Info:
Date: May 6 2024 18:07:05
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.71.0
OCC: 7.6.3
Curl: 7.68.0
ngspice: 42
Compiler: GCC 9.4.0 with C++ ABI 1013
Locale:
Lang: en_GB
Enc: UTF-8
Num: 1,234.5

I was trying to uninstall/reinstall wxwidgets/Kicad - still same message.
I thought that reinstalling Kicad will fix it but unfortunately some configs still stay (?).

Using a four year old LTS is probably involved. 24.04 and 22.04 are both working with KiCad

1 Like

Yeah I can’t say for sure this is related, but we no longer even attempt to build nightlies on 20.04.

If you are stuck on 20.04, maybe switch to Flatpak.

Yep - update to 22.04 fixed the thing :slight_smile: Thanks! :slight_smile: