Cannot "import pcbnew" when running KiCad/bin/python.exe on the command-line


#21

Weird… I have the same version you have, and it work find on my computer!


#22

I did revert back to v5.0.2 since this morning. I wonder if that is a difference with the nightly build? So many variables! :cry:

Just to confirm, what exactly worked on your computer?


#23

I’m have
4.0.7 installed into C:\Program Files\KiCad_4.0.7
5.0.2 installed into C:\Program Files\KiCad_5.0.2
nightly (6.0.0-rc1-dev-1455-g4b7ef22ec) installed into C:\Program Files\KiCad_r12070

All of them are working with “import pcbnew”, and sys.path are seem to point to the correct folder that I installed them!


#24

Weirder and weirder!

Just to confirm, you are NOT using the scripting console in PCBNEW right?
Also, what is your Windows version?


#25

Would it be you have a mix-match version of _pcbnew.pyd ? Or more than 1 _pcbnew.pyd in your installation folder?


#26

I try both from pcbnew console, and CMD… They both work!


#27

It seem to me, this may mean the _pcbnew.pyd version are mix match with other DLL install in KiCad folder…


#28

I didn’t find any extra _pcbnew.pyd copies. Also, when I installed v5.0.2, I uninstalled KiCad first and made sure C:/Program Files/KiCad was empty.


#29

That seem weird! I have no more idea for now!


#30

Thank you very much for the ideas and confirmation that it works on your PC though!


#31

Oh, my is Windows 7, x64

Version: (6.0.0-rc1-dev-1455-g4b7ef22ec), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    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
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON