It seems that I have wrong python in my shell path:
artem@ubuntu:~$ which python
This message was posted on behalf of Intel Corporation
Were you able to import contextlib to python? Also, there’s a newer image than edison-src-ww18-15.tgz available here: https://software.intel.com/en-us/iot/hardware/edison/downloads in case you want to try it out.
I had an poky toolchain in my $PATH variable from previous installation so python was used from there. I cleared it and bitbake started successfully.
Which download should I use from https://software.intel.com/en-us/iot/hardware/edison/downloads to get new edison-src tarball? Unfortunately 'edison-src-ww18-15.tgz' has old poky 1.6.1 toolchain... (((