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

gcd in fractions removed from python 3.9 #7

Open
designbynumbers opened this issue Nov 1, 2021 · 0 comments
Open

gcd in fractions removed from python 3.9 #7

designbynumbers opened this issue Nov 1, 2021 · 0 comments

Comments

@designbynumbers
Copy link

When running the examples in python 3.10, one gets:

from pyknotid.make import trefoil
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/site-packages/pyknotid/make/init.py", line 13, in
from pyknotid.make.torus import torus_knot, torus_link
File "/usr/local/lib/python3.10/site-packages/pyknotid/make/torus.py", line 14, in
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/usr/local/Cellar/[email protected]/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/fractions.py)

it seems that the problem is that this function has been replaced by math.gcd in python 3.9 and up:

https://docs.python.org/3/library/fractions.html

@dotmet dotmet mentioned this issue Dec 2, 2022
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

1 participant