I am trying to follow the tutorial given in: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.html
bgsegm was in contrib module of opencv, but after the update I am not sure.
But still, if you have not built contrib module:
pip install opencv-contrib-python
Make sure no console is running that has imported cv2 while you execute your installing process.
Run the cmd as Administration
It worked for me.