Looks like, with the great help of @AnachronistJohn , @abs0 and @jaypatelani , I switched my NetBSD system from using binary packages via pkgin to the pkgsrc and building packages from source 
https://eugene-andrienko.com/2026-09-07-bsd-pkgsrc-ports.html
For now, it works and I'm able to have some packages in my system, with the necessary compile-time options. And only one version of Python interpreter installed, not two
. Also removed a lot of unnecessary packages, so the disk space usage went down from 18 Gb to 17 Gb 