Skip to content
Advertisement

Ubuntu error — cannot import name ‘gcd’ from ‘fractions’

I’m using Ubuntu to learn basic bioinformatics. I just downloaded multiqc using conda, but when I want to run multiqc, it returns: enter image description here

I am very naive and don’t know how to solve this problem. ANY help would be highly appreciated. Thanks

Advertisement

Answer

I think gcd was moved to the math pack in 3.9. See https://docs.python.org/3/library/fractions.html

Changed in version 3.9: The math.gcd() function is now used to normalize the numerator and denominator. math.gcd() always return a int type. Previously, the GCD type depended on numerator and denominator.

I suggest you create a virtual environment with 3.8 and try that. There are tons of tutorials on how to do this.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement