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