Error: unable to create the Python Console macOS 11.2

Hi,

I have : Error: unable to create the Python Console error message when I try to run Python scripting console.

I’m using Kicad 5.99 on macOS Big Sur Version 11.2

Below Kicad information :

Application: Pcbnew

Version: (5.99.0-8896-gd784507791), release build

Libraries:
wxWidgets 3.0.4
libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.41.0

Platform: macOS Version 10.16 (Build 20D64), 64 bit, Little endian, wxMac

Build Info:
Date: Feb 5 2021 06:33:40
wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
Boost: 1.75.0
OCC: 7.5.0
Curl: 7.54.0
ngspice: 31
Compiler: Clang 10.0.1 with C++ ABI 1002

Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
KICAD_USE_OCC=ON
KICAD_SPICE=ON

Do you have an idea how solve this issue ?
I saw there some similar topics but their solutions failed in my case.

Thanks,

Best guess it that you may need to explicitly set PYTHONPATH to the KiCad provided python but you have not really described what you have tried.
Remember 5.99 is the development version and there may be bugs. If you hit a problem, search the bugtracker and report it if you have a new issue.

Hi John,

I wanted to run some external scripting as Generate Interactive HTML BoM and it didn’t work, so I tried just to launch Python Console and saw that it didn’t work also.

I added PYTHONPATH, it failed also.

I will take a look to a bugtracker.

Thanks

Do you have the latest version of the plug-in. I know only the latest runs on 5.99. You may need to remove any old versions.

I am back at my Mac now. I checked and I have to set PYTHONPATH to /Applications/KiCad/KiCad.app/Contents/SharedSupport/scripting (or adjust to wherever you install KiCad)
and then the scripting console works. Need to restart KiCad. Just checked again on a fresh nightly. Doesn’t run without doing this.

Bug reported here.

Thanks John,

By adding this PYTHONPATH to /Applications/KiCad/KiCad.app/Contents/SharedSupport/scripting it works.
Before I tried to others folders it failed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.