Skip to content

ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.10/fractions.py) #137

Description

@orobsonlourenco

I'm trying to use python to convert a file for use in gromacs and this error is shown. How do I fix it?

python3 cgenff_charmm2gmx_py3_nx1.py ligand ligand_fix.mol2 ligand.str charmm36-jul2022.ff
Traceback (most recent call last):
File "/mnt/c/Users/conta/Desktop/MD/Test/cgenff_charmm2gmx_py3_nx1.py", line 51, in
import networkx as nx
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/init.py", line 114, in
import networkx.generators
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/generators/init.py", line 14, in
from networkx.generators.intersection import *
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/generators/intersection.py", line 13, in
from networkx.algorithms import bipartite
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/algorithms/init.py", line 16, in
from networkx.algorithms.dag import *
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/algorithms/dag.py", line 23, in
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.10/fractions.py)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions