Cannot import 'collections.abc' when using windows subsystem for linux
13:51 27 May 2019

I'm using windows subsystem for linux (specifically Ubuntu for Windows) to run some python code. When I try to run the following: 'import collections.abc', I get the following error: 'ImportError: No module named abc'.

I can import 'collections', but if I try: 'collections.abc', I get the following error: 'AttributeError: 'module' object has no attribute 'abc''.

Furthermore, I tried importing the module in command prompt without using Ubuntu for Windows, and it imports successfully.

The 'collections' module should be included in python by default, so I'm not sure why it's giving me this error.

python windows-subsystem-for-linux