How to solve this below given error while writing ligand topology files

Brief description of tools/files:

Link:
Contact person (name and email address):

How the work has been tested/reviewed: abc@abc-desktop:~/Desktop/simulation1$ python3 cgenff_charmm2gmx_py3_nx2.py JZ4 jz4_fix.mol2 jz4_fix.str charmm36-mar2019.ff/
Traceback (most recent call last):
File “cgenff_charmm2gmx_py3_nx2.py”, line 54, in
import networkx as nx
File “/home/abc/.local/lib/python3.8/site-packages/networkx/init.py”, line 117, in
import networkx.readwrite
File “/home/abc/.local/lib/python3.8/site-packages/networkx/readwrite/init.py”, line 15, in
from networkx.readwrite.graphml import *
File “/home/abc/.local/lib/python3.8/site-packages/networkx/readwrite/graphml.py”, line 314, in
class GraphML(object):
File “/home/abc/.local/lib/python3.8/site-packages/networkx/readwrite/graphml.py”, line 346, in GraphML
(np.int, “int”), (np.int8, “int”),
File “/home/abc/.local/lib/python3.8/site-packages/numpy/init.py”, line 305, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module ‘numpy’ has no attribute ‘int’.
np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
NumPy 1.20.0 Release Notes — NumPy v2.2.dev0 Manual
abc@abc-desktop:~/Desktop/simulation1$ python cgenff_charmm2gmx_py3_nx2.py JZ4 jz4_fix.mol2 jz4_fix.str charmm36-mar2019.ff
Traceback (most recent call last):
File “cgenff_charmm2gmx_py3_nx2.py”, line 53, in
import numpy as np
ModuleNotFoundError: No module named ‘numpy’

Have you read the README of the script you are using? See GitHub - Lemkul-Lab/cgenff_charmm2gmx: Python scripts to convert CGenFF stream files to GROMACS format. Try with Python 3.5 or 3.7 and see if it helps.

ok. let me try.

hello sir I tried with Python 3.6 , python 3.5 but the error is same. So what should I try next?

It’s possible that it would work with an older version of numpy. If you could try a version before 1.20 it might help, but I find version management of python modules a bit tedious. Using a conda environment helps.

Thank you sir. I found a solution.
First I uninstalled numpy.
Then installed numpy.