• Uncategorized

About python : Calling-py-in-Ubuntu-leading-to-collectionsabc-Deprecation-Warning

Question Detail

So, I have just installed Ubuntu for the first time and am trying to run a very simple Python project. Upon the first run, I got the collections.abc Deprecation Warning, which prompt me to make sure my project was up to date.

After additional investigation, I found out that just running the py command leads to this Deprecation Warning, as seen below:

Documents$ py

/usr/bin/py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Iterable

Any ideas how I can fix this? I already removed Python 2 from the system and made sure that Python 3 is up to date.

Question Answer

Found this concerning your issue:

also, in Unix/Linux, the call to the Python environment is “python” not py.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.