ImportError: cannot import name 'gcd'

GROMACS version:2020.3
GROMACS modification: Yes/No
I am running tutorial 5 protein ligand complex-ligand topology building (step) using my own data. however, the output that I am getting says cannot import name 'gcd:. I am using python 3.9.4 . I think I have used the correct script (

Below the output:
Nishas-MacBook-Pro:neo nisha$ python3 NEO neo_clean.mol2 neo_clean.str charmm36-feb2021.ff
Traceback (most recent call last):
File “/Users/nisha/Desktop/neo/”, line 51, in
import networkx as nx
File “/usr/local/lib/python3.9/site-packages/networkx/”, line 84, in
import networkx.generators
File “/usr/local/lib/python3.9/site-packages/networkx/generators/”, line 5, in
from networkx.generators.classic import *
File “/usr/local/lib/python3.9/site-packages/networkx/generators/”, line 21, in
from networkx.algorithms.bipartite.generators import complete_bipartite_graph
File “/usr/local/lib/python3.9/site-packages/networkx/algorithms/”, line 12, in
from networkx.algorithms.dag import *
File “/usr/local/lib/python3.9/site-packages/networkx/algorithms/”, line 2, in
from fractions import gcd
ImportError: cannot import name ‘gcd’ from ‘fractions’ (/usr/local/Cellar/python@3.9/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/