Under linux one can have Kicad V5 and Kicad-nighly both installed. As KiCad uses system python, by default when you import pcbnew it imports 5.1.x version. How does one import nightly pcbnew module?
I am checking pcbnew module version with pcbnew.GetBuildVersion()
And if one can elaborate even further. Under Windows, when developing standalone pcbnew code I could do that using pyCharm or VSCode and point them to use KiCad or KiCad-nightly interpreter. This way it was easy for me to check how code works both in 5.1.x and nightly just by switching interpreter. And as interpreter was used only and only for KiCad I alos did not have to worry I’d put it unsuable state. How does one achieve this under linux?
My specifics:
Kubuntu 20.04
Kicad 5.1.8 and Kicad-nightly installed via official ppa repositories
Looks like you will have to manually add /usr/lib/kicad-nightly/lib/python3/dist-packages to PYTHON_PATH and LD_LIBRARY_PATH to load nightly pcbnew python module.