I'm trying to import a library in anaconda
from neupy import algorithms
ImportError: cannot import name 'gcd' from 'fractions'
CodePudding user response:
That seems to be a more general issue. See this previous question on the matter: Import Error: can't import name gcd from fractions
CodePudding user response:
From Python 3.9, GCD is moved to Math.
https://docs.python.org/3/library/math.html#math.gcd
Try using math.gcd(a, b)
.