You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "c:\python39\lib\site-packages\postman_problems\postman_chinese.py", line 1, in
from postman_problems.postman_template import generic_postman
File "c:\python39\lib\site-packages\postman_problems\postman_template.py", line 4, in
from postman_problems.solver import cpp, rpp
File "c:\python39\lib\site-packages\postman_problems\solver.py", line 3, in
import networkx as nx
File "c:\python39\lib\site-packages\networkx_init_.py", line 114, in
import networkx.generators
File "c:\python39\lib\site-packages\networkx\generators_init_.py", line 6, in
from networkx.generators.classic import *
File "c:\python39\lib\site-packages\networkx\generators\classic.py", line 26, in
from networkx.algorithms.bipartite.generators import complete_bipartite_graph
File "c:\python39\lib\site-packages\networkx\algorithms_init_.py", line 16, in
from networkx.algorithms.dag import *
File "c:\python39\lib\site-packages\networkx\algorithms\dag.py", line 14, in
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (c:\python39\lib\fractions.py)
Potentially compatibility issue in the networkx lib?
Thanks for reporting this. I'll admit this lib hasn't received the love it deserves in terms of maintenance. The core of it was developed ~2016 a few years before Python 3.9 was released in 2020.
I'm not sure when I'll get around to adding proper support for the most recent Python and networkx versions. But I'm happy to review PRs if you want to take a stab at it!
I'm getting the following error:
Potentially compatibility issue in the networkx lib?
https://stackoverflow.com/questions/66174862/import-error-cant-import-name-gcd-from-fractions
The text was updated successfully, but these errors were encountered: