Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cannot get TopologicalSorter from graphlib

I did

pip3 install graphlib

I can now import graphlib, but

from graphlib import TopologicalSorter

fails. If I import graphlib, it tells me that there is no attibute TopologicalSorter.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

What am I doing wrong?

>Solution :

Confusingly, graphlib on PyPI is not the real graphlib, so you don’t have the right package installed.

You need to replace graphlib’s evil twin with the real thing:

pip3 uninstall graphlib
pip3 install graphlib-backport
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading