Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.9 Compatability issue #71

Open
KWolfe81 opened this issue Jan 22, 2024 · 1 comment
Open

Python 3.9 Compatability issue #71

KWolfe81 opened this issue Jan 22, 2024 · 1 comment

Comments

@KWolfe81
Copy link

KWolfe81 commented Jan 22, 2024

I'm getting the following error:

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?

https://stackoverflow.com/questions/66174862/import-error-cant-import-name-gcd-from-fractions

@andrewbrooks-o
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants